Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Bank Transfer | Cartasi | GivaCard | SprayPay | Przelewy24 |

# Requirements

PHP 5.6 or higher
PHP 7.4 or higher


# Installation
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"description": "Pay.nl driver for the Omnipay PHP payment processing library based on the V3 PayNL orders API",
"type": "library",
"require": {
"php": ">=7.4",
"omnipay/common": "^3.3",
"ext-json": "*"
},
Expand Down
5 changes: 4 additions & 1 deletion src/Internal/PayOrderNotFoundResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@

class PayOrderNotFoundResponse {

protected mixed $data;
/**
* @var array|null
*/
protected $data;
private $orderNotFoundStatusCode = 'PAY-2001';

public function __construct($data)
Expand Down
8 changes: 4 additions & 4 deletions src/Message/Request/PurchaseRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ public function getData()
$data['order']['countryCode'] = !empty($card->getCountry()) ? substr($card->getCountry(), 0, 2) : null;
$data['order']['invoiceAddress']['firstName'] = $card->getBillingFirstName();
$data['order']['invoiceAddress']['lastName'] = $card->getBillingLastName();
$data['order']['invoiceAddress']['street'] = $billingAddressParts[1];
$data['order']['invoiceAddress']['streetNumber'] = $billingAddressParts[2];
$data['order']['invoiceAddress']['street'] = isset($billingAddressParts[1]) ? $billingAddressParts[1] : null;
$data['order']['invoiceAddress']['streetNumber'] = isset($billingAddressParts[2]) ? $billingAddressParts[2] : null;
$data['order']['invoiceAddress']['streetNumberExtension'] = isset($billingAddressParts[3]) ? $billingAddressParts[3] : null;
$data['order']['invoiceAddress']['zipCode'] = $card->getBillingPostcode();
$data['order']['invoiceAddress']['city'] = $card->getBillingCity();
Expand All @@ -84,8 +84,8 @@ public function getData()

$data['order']['deliveryAddress']['firstName'] = $card->getShippingFirstName();
$data['order']['deliveryAddress']['lastName'] = $card->getShippingLastName();
$data['order']['deliveryAddress']['street'] = $shippingAddressParts[1];
$data['order']['deliveryAddress']['streetNumber'] = $shippingAddressParts[2];
$data['order']['deliveryAddress']['street'] = isset($shippingAddressParts[1]) ? $shippingAddressParts[1] : null;
$data['order']['deliveryAddress']['streetNumber'] = isset($shippingAddressParts[2]) ? $shippingAddressParts[2] : null;
$data['order']['deliveryAddress']['streetNumberExtension'] = isset($shippingAddressParts[3]) ? $shippingAddressParts[3] : null;
$data['order']['deliveryAddress']['zipCode'] = $card->getShippingPostcode();
$data['order']['deliveryAddress']['city'] = $card->getShippingCity();
Expand Down
2 changes: 1 addition & 1 deletion src/Message/Request/RefundRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function getData()
*/
public function sendData($data)
{
$responseData = $this->sendRequestRestApi('transactions/' . $data['id'] . '/refund', method: 'PATCH');
$responseData = $this->sendRequestRestApi('transactions/' . $data['id'] . '/refund', null, 'PATCH');
return $this->response = new RefundResponse($this, $responseData);
}
}
2 changes: 1 addition & 1 deletion src/Message/Request/VoidRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function sendData($data)
{
$voidUrl = '/' . $data['id'] . '/void';

$responseData = $this->sendRequestMultiCore($voidUrl, method: 'PATCH');
$responseData = $this->sendRequestMultiCore($voidUrl, null, 'PATCH');
return $this->response = new VoidResponse($this, $responseData);
}
}
5 changes: 4 additions & 1 deletion src/Message/Response/FetchServiceConfigResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
class FetchServiceConfigResponse {

protected RequestInterface $request;
protected mixed $data;
/**
* @var array|null
*/
protected $data;

public function __construct(RequestInterface $request, $data)
{
Expand Down