From c497803d49c565da2d05bc15f0bca2dbe963d4f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A9sz=C3=A1ros=20R=C3=B3bert?= Date: Tue, 14 Apr 2020 11:33:51 +0300 Subject: [PATCH 1/2] Fix missing return --- modules.local/ppcp-api-client/src/Factory/AmountFactory.php | 1 + 1 file changed, 1 insertion(+) diff --git a/modules.local/ppcp-api-client/src/Factory/AmountFactory.php b/modules.local/ppcp-api-client/src/Factory/AmountFactory.php index 03c20799c..68aefff04 100644 --- a/modules.local/ppcp-api-client/src/Factory/AmountFactory.php +++ b/modules.local/ppcp-api-client/src/Factory/AmountFactory.php @@ -104,6 +104,7 @@ class AmountFactory $total, $breakdown ); + return $amount; } public function fromPayPalResponse(\stdClass $data) : Amount From feb953e5b42935133fab6a5a42c43761bc86258c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A9sz=C3=A1ros=20R=C3=B3bert?= Date: Tue, 14 Apr 2020 11:35:32 +0300 Subject: [PATCH 2/2] Fix missing Item Factory --- modules.local/ppcp-api-client/services.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules.local/ppcp-api-client/services.php b/modules.local/ppcp-api-client/services.php index d597993db..4ca452b9e 100644 --- a/modules.local/ppcp-api-client/services.php +++ b/modules.local/ppcp-api-client/services.php @@ -5,8 +5,8 @@ namespace Inpsyde\PayPalCommerce\ApiClient; use Dhii\Data\Container\ContainerInterface; use Inpsyde\CacheModule\Provider\CacheProviderInterface; -use Inpsyde\PayPalCommerce\ApiClient\Config\Config; use Inpsyde\PayPalCommerce\ApiClient\Authentication\Bearer; +use Inpsyde\PayPalCommerce\ApiClient\Config\Config; use Inpsyde\PayPalCommerce\ApiClient\Endpoint\OrderEndpoint; use Inpsyde\PayPalCommerce\ApiClient\Factory\AddressFactory; use Inpsyde\PayPalCommerce\ApiClient\Factory\AmountFactory; @@ -111,7 +111,8 @@ return [ return new ShippingFactory($addressFactory); }, 'api.factory.amount' => function (ContainerInterface $container) : AmountFactory { - return new AmountFactory(); + $itemFactory = $container->get('api.factory.item'); + return new AmountFactory($itemFactory); }, 'api.factory.payer' => function (ContainerInterface $container) : PayerFactory { $addressFactory = $container->get('api.factory.address');