From 3d35c09a79d3f0876c1c0ab2ad0cb4417b5f206f Mon Sep 17 00:00:00 2001 From: Kristjan Heinaste Date: Tue, 29 Aug 2017 12:41:30 +0100 Subject: [PATCH] AMAZON-45: Upgrade dep. module amazon-pay-sdk-php from 2.1 to 3.1 --- composer.json | 2 +- marketplace-composer.json | 2 +- src/Core/Client/Client.php | 2 +- src/Core/Client/ClientFactory.php | 2 +- src/Core/Client/ClientFactoryInterface.php | 2 +- src/Core/Model/Validation/ApiCredentialsValidator.php | 2 +- src/Core/composer.json | 2 +- src/Core/etc/di.xml | 4 ++-- src/Payment/Domain/AbstractAmazonAuthorizationResponse.php | 2 +- src/Payment/Domain/AbstractAmazonCaptureResponse.php | 2 +- src/Payment/Domain/AbstractAmazonRefundResponse.php | 2 +- src/Payment/Domain/AmazonGetOrderDetailsResponse.php | 2 +- src/Payment/Domain/AmazonRefundResponse.php | 2 +- src/Payment/Domain/AmazonSetOrderDetailsResponse.php | 2 +- src/Payment/Ipn/IpnHandler.php | 2 +- src/Payment/Ipn/IpnHandlerFactory.php | 4 ++-- src/Payment/Ipn/IpnHandlerFactoryInterface.php | 2 +- src/Payment/Ipn/MockIpnHandler.php | 2 +- src/Payment/Model/AddressManagement.php | 2 +- src/Payment/Model/OrderInformationManagement.php | 2 +- src/Payment/etc/di.xml | 2 +- 21 files changed, 23 insertions(+), 23 deletions(-) diff --git a/composer.json b/composer.json index 611175893..db3fbd3c4 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,7 @@ "magento/module-quote": "^100.1.0", "magento/module-customer": "^100.1.0", "magento/module-store": "^100.1.0", - "amzn/login-and-pay-with-amazon-sdk-php": "^2.1.0" + "amzn/amazon-pay-sdk-php": "^3.1.0" }, "require-dev": { "guzzlehttp/guzzle": "^6.2.0", diff --git a/marketplace-composer.json b/marketplace-composer.json index f6b59b8a4..d281d529a 100644 --- a/marketplace-composer.json +++ b/marketplace-composer.json @@ -8,7 +8,7 @@ ], "require": { "php": "~5.6.5|7.0.2|7.0.4|~7.0.6", - "amzn/login-and-pay-with-amazon-sdk-php": "^2.1.0", + "amzn/amazon-pay-sdk-php": "^3.1.0", "amzn/amazon-pay-and-login-with-amazon-core-module": "^1.1.1", "amzn/login-with-amazon-module": "^1.1.1", "amzn/amazon-pay-module": "^1.1.1" diff --git a/src/Core/Client/Client.php b/src/Core/Client/Client.php index 520bba797..763d79b7b 100644 --- a/src/Core/Client/Client.php +++ b/src/Core/Client/Client.php @@ -15,7 +15,7 @@ */ namespace Amazon\Core\Client; -use PayWithAmazon\Client as AmazonClient; +use AmazonPay\Client as AmazonClient; class Client extends AmazonClient { diff --git a/src/Core/Client/ClientFactory.php b/src/Core/Client/ClientFactory.php index c39e4bb98..00e65b4b9 100644 --- a/src/Core/Client/ClientFactory.php +++ b/src/Core/Client/ClientFactory.php @@ -55,7 +55,7 @@ public function __construct( ObjectManagerInterface $objectManager, Data $coreHelper, LoggerInterface $logger, - $instanceName = '\\PayWithAmazon\\ClientInterface' + $instanceName = '\\AmazonPay\\ClientInterface' ) { $this->objectManager = $objectManager; $this->coreHelper = $coreHelper; diff --git a/src/Core/Client/ClientFactoryInterface.php b/src/Core/Client/ClientFactoryInterface.php index aa29b254c..08e661ce9 100644 --- a/src/Core/Client/ClientFactoryInterface.php +++ b/src/Core/Client/ClientFactoryInterface.php @@ -16,7 +16,7 @@ namespace Amazon\Core\Client; use Magento\Store\Model\ScopeInterface; -use PayWithAmazon\ClientInterface; +use AmazonPay\ClientInterface; interface ClientFactoryInterface { diff --git a/src/Core/Model/Validation/ApiCredentialsValidator.php b/src/Core/Model/Validation/ApiCredentialsValidator.php index ecad1f71c..d9eb22c22 100644 --- a/src/Core/Model/Validation/ApiCredentialsValidator.php +++ b/src/Core/Model/Validation/ApiCredentialsValidator.php @@ -19,7 +19,7 @@ use Amazon\Core\Helper\Data; use Magento\Framework\DataObject; use Magento\Framework\Validator\AbstractValidator; -use PayWithAmazon\ResponseInterface; +use AmazonPay\ResponseInterface; class ApiCredentialsValidator extends AbstractValidator { diff --git a/src/Core/composer.json b/src/Core/composer.json index e36d9c7b5..d1cd6698b 100644 --- a/src/Core/composer.json +++ b/src/Core/composer.json @@ -12,7 +12,7 @@ "magento/module-store": "^100.1.0", "magento/module-developer": "^100.1.0", "magento/module-quote": "^100.1.0", - "amzn/login-and-pay-with-amazon-sdk-php": "^2.1.0" + "amzn/amazon-pay-sdk-php": "^3.1.0" }, "autoload": { "files": ["registration.php"], diff --git a/src/Core/etc/di.xml b/src/Core/etc/di.xml index 240d3eabe..d3fe394e3 100644 --- a/src/Core/etc/di.xml +++ b/src/Core/etc/di.xml @@ -1,8 +1,8 @@ - - + + diff --git a/src/Payment/Domain/AbstractAmazonAuthorizationResponse.php b/src/Payment/Domain/AbstractAmazonAuthorizationResponse.php index 42869f14c..4bd3f2a08 100644 --- a/src/Payment/Domain/AbstractAmazonAuthorizationResponse.php +++ b/src/Payment/Domain/AbstractAmazonAuthorizationResponse.php @@ -18,7 +18,7 @@ use Amazon\Core\Exception\AmazonServiceUnavailableException; use Amazon\Payment\Domain\Details\AmazonAuthorizationDetails; use Amazon\Payment\Domain\Details\AmazonAuthorizationDetailsFactory; -use PayWithAmazon\ResponseInterface; +use AmazonPay\ResponseInterface; abstract class AbstractAmazonAuthorizationResponse { diff --git a/src/Payment/Domain/AbstractAmazonCaptureResponse.php b/src/Payment/Domain/AbstractAmazonCaptureResponse.php index 6828ccae8..ed1d36feb 100644 --- a/src/Payment/Domain/AbstractAmazonCaptureResponse.php +++ b/src/Payment/Domain/AbstractAmazonCaptureResponse.php @@ -18,7 +18,7 @@ use Amazon\Core\Exception\AmazonServiceUnavailableException; use Amazon\Payment\Domain\Details\AmazonCaptureDetails; use Amazon\Payment\Domain\Details\AmazonCaptureDetailsFactory; -use PayWithAmazon\ResponseInterface; +use AmazonPay\ResponseInterface; abstract class AbstractAmazonCaptureResponse { diff --git a/src/Payment/Domain/AbstractAmazonRefundResponse.php b/src/Payment/Domain/AbstractAmazonRefundResponse.php index 53acec170..a963e2011 100644 --- a/src/Payment/Domain/AbstractAmazonRefundResponse.php +++ b/src/Payment/Domain/AbstractAmazonRefundResponse.php @@ -18,7 +18,7 @@ use Amazon\Core\Exception\AmazonServiceUnavailableException; use Amazon\Payment\Domain\Details\AmazonRefundDetails; use Amazon\Payment\Domain\Details\AmazonRefundDetailsFactory; -use PayWithAmazon\ResponseInterface; +use AmazonPay\ResponseInterface; abstract class AbstractAmazonRefundResponse { diff --git a/src/Payment/Domain/AmazonGetOrderDetailsResponse.php b/src/Payment/Domain/AmazonGetOrderDetailsResponse.php index b195a4a53..6597ca9f3 100644 --- a/src/Payment/Domain/AmazonGetOrderDetailsResponse.php +++ b/src/Payment/Domain/AmazonGetOrderDetailsResponse.php @@ -18,7 +18,7 @@ use Amazon\Core\Exception\AmazonServiceUnavailableException; use Amazon\Payment\Domain\Details\AmazonOrderDetails; use Amazon\Payment\Domain\Details\AmazonOrderDetailsFactory; -use PayWithAmazon\ResponseInterface; +use AmazonPay\ResponseInterface; class AmazonGetOrderDetailsResponse { diff --git a/src/Payment/Domain/AmazonRefundResponse.php b/src/Payment/Domain/AmazonRefundResponse.php index 729fdf311..6f3c35cc6 100644 --- a/src/Payment/Domain/AmazonRefundResponse.php +++ b/src/Payment/Domain/AmazonRefundResponse.php @@ -15,7 +15,7 @@ */ namespace Amazon\Payment\Domain; -use PayWithAmazon\ResponseInterface; +use AmazonPay\ResponseInterface; class AmazonRefundResponse extends AbstractAmazonRefundResponse { diff --git a/src/Payment/Domain/AmazonSetOrderDetailsResponse.php b/src/Payment/Domain/AmazonSetOrderDetailsResponse.php index 3bd88a706..b9fbbd1a6 100644 --- a/src/Payment/Domain/AmazonSetOrderDetailsResponse.php +++ b/src/Payment/Domain/AmazonSetOrderDetailsResponse.php @@ -16,7 +16,7 @@ namespace Amazon\Payment\Domain; use Amazon\Core\Exception\AmazonServiceUnavailableException; -use PayWithAmazon\ResponseInterface; +use AmazonPay\ResponseInterface; class AmazonSetOrderDetailsResponse { diff --git a/src/Payment/Ipn/IpnHandler.php b/src/Payment/Ipn/IpnHandler.php index b2a57f677..ce980acb8 100644 --- a/src/Payment/Ipn/IpnHandler.php +++ b/src/Payment/Ipn/IpnHandler.php @@ -15,7 +15,7 @@ */ namespace Amazon\Payment\Ipn; -use PayWithAmazon\IpnHandler as AmazonIpnHandler; +use AmazonPay\IpnHandler as AmazonIpnHandler; class IpnHandler extends AmazonIpnHandler { diff --git a/src/Payment/Ipn/IpnHandlerFactory.php b/src/Payment/Ipn/IpnHandlerFactory.php index 1a0571a78..5a9e24cd9 100644 --- a/src/Payment/Ipn/IpnHandlerFactory.php +++ b/src/Payment/Ipn/IpnHandlerFactory.php @@ -18,7 +18,7 @@ use Amazon\Core\Helper\Data; use Amazon\Core\Model\EnvironmentChecker; use Magento\Framework\ObjectManagerInterface; -use PayWithAmazon\IpnHandlerInterface; +use AmazonPay\IpnHandlerInterface; use Psr\Log\LoggerAwareInterface; use Psr\Log\LoggerInterface; @@ -54,7 +54,7 @@ public function __construct( EnvironmentChecker $environmentChecker, LoggerInterface $logger, Data $coreHelper, - $instanceName = '\\PayWithAmazon\\IpnHandlerInterface' + $instanceName = '\\AmazonPay\\IpnHandlerInterface' ) { $this->objectManager = $objectManager; $this->instanceName = $instanceName; diff --git a/src/Payment/Ipn/IpnHandlerFactoryInterface.php b/src/Payment/Ipn/IpnHandlerFactoryInterface.php index 171b074a1..c32509483 100644 --- a/src/Payment/Ipn/IpnHandlerFactoryInterface.php +++ b/src/Payment/Ipn/IpnHandlerFactoryInterface.php @@ -15,7 +15,7 @@ */ namespace Amazon\Payment\Ipn; -use PayWithAmazon\IpnHandlerInterface; +use AmazonPay\IpnHandlerInterface; interface IpnHandlerFactoryInterface { diff --git a/src/Payment/Ipn/MockIpnHandler.php b/src/Payment/Ipn/MockIpnHandler.php index 6e6417fb1..9b4f84b54 100644 --- a/src/Payment/Ipn/MockIpnHandler.php +++ b/src/Payment/Ipn/MockIpnHandler.php @@ -15,7 +15,7 @@ */ namespace Amazon\Payment\Ipn; -use PayWithAmazon\IpnHandler as AmazonIpnHandler; +use AmazonPay\IpnHandler as AmazonIpnHandler; /** * Class MockIpnHandler diff --git a/src/Payment/Model/AddressManagement.php b/src/Payment/Model/AddressManagement.php index 147f8b997..1aa20a91e 100644 --- a/src/Payment/Model/AddressManagement.php +++ b/src/Payment/Model/AddressManagement.php @@ -29,7 +29,7 @@ use Magento\Framework\Validator\Factory; use Magento\Framework\Webapi\Exception as WebapiException; use Magento\Quote\Model\Quote; -use PayWithAmazon\ResponseInterface; +use AmazonPay\ResponseInterface; use Psr\Log\LoggerInterface; class AddressManagement implements AddressManagementInterface diff --git a/src/Payment/Model/OrderInformationManagement.php b/src/Payment/Model/OrderInformationManagement.php index 0324b78b9..037f864b4 100644 --- a/src/Payment/Model/OrderInformationManagement.php +++ b/src/Payment/Model/OrderInformationManagement.php @@ -30,7 +30,7 @@ use Magento\Framework\Exception\ValidatorException; use Magento\Quote\Model\Quote; use Magento\Store\Model\ScopeInterface; -use PayWithAmazon\ResponseInterface; +use AmazonPay\ResponseInterface; use Psr\Log\LoggerInterface; class OrderInformationManagement implements OrderInformationManagementInterface diff --git a/src/Payment/etc/di.xml b/src/Payment/etc/di.xml index a6c13d782..a0d44c7ff 100644 --- a/src/Payment/etc/di.xml +++ b/src/Payment/etc/di.xml @@ -11,7 +11,7 @@ - +