From f0ecaa21cbdcbb33d57b11c139378c29f5b1c63a Mon Sep 17 00:00:00 2001 From: Igor Mukhin Date: Mon, 23 Dec 2019 13:30:10 +0200 Subject: [PATCH 1/4] Fixed: phpunit config to not report empty tests from GenericActionTest --- phpunit.xml.dist | 1 + 1 file changed, 1 insertion(+) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index b5a44f5..8cd0d8f 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -2,6 +2,7 @@ From bc1e042e2e4b4743682ae504a9122a75644d149b Mon Sep 17 00:00:00 2001 From: Igor Mukhin Date: Thu, 2 Jan 2020 17:16:53 +0200 Subject: [PATCH 2/4] Fixed: Passing all parameters to payment creation request to support Klarna --- src/Api.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Api.php b/src/Api.php index bb2e315..31a412c 100644 --- a/src/Api.php +++ b/src/Api.php @@ -59,7 +59,15 @@ public function getPayment(ArrayObject $params, bool $create = true): QuickPayPa /** @var Payment $paymentModel */ $paymentModel = $params['payment']; if ($create) { - $response = $this->doRequest('POST', 'payments', [ +// // You should specify this parameters in order to use Klarna +// ArrayObject::validatedKeysSet([ +// 'shipping_address', +// 'invoice_address', +// 'shipping', +// 'basket', +// ]); + + $response = $this->doRequest('POST', 'payments', $params->getArrayCopy() + [ 'order_id' => $this->getOption('order_prefix').$paymentModel->getNumber(), 'currency' => $paymentModel->getCurrencyCode(), ]); From fbdbb17f65e447dffabcc2f3f69afb5cd45d77e4 Mon Sep 17 00:00:00 2001 From: Igor Mukhin Date: Thu, 2 Jan 2020 17:25:48 +0200 Subject: [PATCH 3/4] Fixed: Phpstan warning --- src/Api.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Api.php b/src/Api.php index 31a412c..2ae0a7e 100644 --- a/src/Api.php +++ b/src/Api.php @@ -25,7 +25,7 @@ class Api /** @var MessageFactory */ protected $messageFactory; - /** @var array */ + /** @var ArrayObject|array */ protected $options = []; public function __construct(array $options, HttpClientInterface $client, MessageFactory $messageFactory) From 3a2d4125f6194acae7788e994c6ebc91c9b5522f Mon Sep 17 00:00:00 2001 From: Igor Mukhin Date: Mon, 6 Jan 2020 09:55:53 +0200 Subject: [PATCH 4/4] Dropped: PHP 7.1 support --- .travis.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1337330..579a8f0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,9 +11,6 @@ cache: matrix: fast_finish: true include: - - php: '7.1' - - php: '7.1' - env: 'COMPOSER_FLAGS="--prefer-stable --prefer-lowest"' - php: '7.2' - php: '7.2' env: 'COMPOSER_FLAGS="--prefer-stable --prefer-lowest"'