diff --git a/Api/KeyUpgradeInterface.php b/Api/KeyUpgradeInterface.php
new file mode 100644
index 000000000..c0a2029d0
--- /dev/null
+++ b/Api/KeyUpgradeInterface.php
@@ -0,0 +1,59 @@
+autokeyexchange = $autokeyexchange;
+ $this->keyUpgrade = $keyUpgrade;
}
/**
@@ -64,4 +72,20 @@ public function getCurrency()
}
return $currency;
}
+
+ /**
+ * Whether to display Key Upgrade or AKE
+ */
+ public function canUpgrade()
+ {
+ return $this->keyUpgrade->getMwsKeyForScope();
+ }
+
+ /**
+ * Return Key Upgrade info
+ */
+ public function getKeyUpgradeConfig()
+ {
+ return json_encode($this->keyUpgrade->getJsonAmazonKeyUpgradeConfig());
+ }
}
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6d533c159..8aedd2d4d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,10 @@
# Change Log
+## 5.15.0
+* Added Key Upgrade feature (automatically upgrade CV1 keys to CV2 if updating from legacy module)
+* Fixed backward compatibility with Zend availability
+* Fixed render issue with multiple Amazon Sign In buttons on the same page
+
## 5.14.3
* Fixed PHP 7 compatibility
diff --git a/Controller/Adminhtml/Pay/ManualKeyUpgrade.php b/Controller/Adminhtml/Pay/ManualKeyUpgrade.php
new file mode 100644
index 000000000..90cdc4153
--- /dev/null
+++ b/Controller/Adminhtml/Pay/ManualKeyUpgrade.php
@@ -0,0 +1,103 @@
+config = $config;
+ $this->jsonResultFactory = $jsonResultFactory;
+ $this->cacheManager = $cacheManager;
+ $this->keyUpgrade = $keyUpgrade;
+ }
+
+ public function execute()
+ {
+ $scopeType = $this->_request->getParam('scope');
+ $scopeCode = (int) $this->_request->getParam('scopeCode');
+
+ $publicKeyId = $this->keyUpgrade->getPublicKeyId(
+ $scopeType,
+ $scopeCode,
+ $this->_request->getParam('accessKey')
+ );
+
+ $result = $this->jsonResultFactory->create();
+ if (!empty($publicKeyId)) {
+ $this->keyUpgrade->updateKeysInConfig(
+ $publicKeyId,
+ $scopeType,
+ $scopeCode
+ );
+
+ $this->cacheManager->clean([CacheTypeConfig::TYPE_IDENTIFIER]);
+ $result->setData(['result' => 'success']);
+ $this->messageManager->addSuccessMessage('Amazon Pay keys upgraded successfully.');
+ } else {
+ $result->setData(['result' => 'error']);
+ $this->messageManager->addErrorMessage('Amazon Pay keys could not be upgraded. '
+ . 'See the paywithamazon.log for more details');
+ }
+
+ return $result;
+ }
+}
diff --git a/Helper/Customer.php b/Helper/Customer.php
index a42ebe31d..5d9610066 100644
--- a/Helper/Customer.php
+++ b/Helper/Customer.php
@@ -18,7 +18,6 @@
namespace Amazon\Pay\Helper;
use Amazon\Pay\Api\Data\AmazonCustomerInterface;
-use Magento\Framework\Validator\ValidatorChain;
class Customer
{
@@ -79,8 +78,18 @@ public function getAmazonCustomer($buyerInfo)
public function createCustomer(AmazonCustomerInterface $amazonCustomer)
{
- if (! ValidatorChain::is($amazonCustomer->getEmail(), '\Magento\Framework\Validator\EmailAddress')) {
- throw new ValidatorException(__('the email address for your Amazon account is invalid'));
+ // Zend classes removed in Magento 2.4.6
+ if (class_exists(\Magento\Framework\Validator\ValidatorChain::class, true)) {
+ if (! \Magento\Framework\Validator\ValidatorChain::is(
+ $amazonCustomer->getEmail(),
+ \Magento\Framework\Validator\EmailAddress::class
+ )) {
+ throw new ValidatorException(__('the email address for your Amazon account is invalid'));
+ }
+ } else {
+ if (! \Zend_Validate::is($amazonCustomer->getEmail(), 'EmailAddress')) {
+ throw new ValidatorException(__('the email address for your Amazon account is invalid'));
+ }
}
$customerData = $this->customerLinkManagement->create($amazonCustomer);
diff --git a/Helper/Key.php b/Helper/Key.php
new file mode 100644
index 000000000..7d2e6a4dc
--- /dev/null
+++ b/Helper/Key.php
@@ -0,0 +1,152 @@
+request = $request;
+ $this->storeManager = $storeManager;
+
+ // Find store ID and scope
+ $this->_websiteId = $request->getParam('website', 0);
+ $this->_storeId = $request->getParam('store', 0);
+ $this->_scope = $request->getParam('scope');
+
+ // Website scope
+ if ($this->_websiteId) {
+ $this->_scope = !$this->_scope ? 'websites' : $this->_scope;
+ } else {
+ $this->_websiteId = $storeManager->getWebsite()->getId();
+ }
+
+ // Store scope
+ if ($this->_storeId) {
+ $this->_websiteId = $this->storeManager->getStore($this->_storeId)->getWebsite()->getId();
+ $this->_scope = !$this->_scope ? 'stores' : $this->_scope;
+ } else {
+ $this->_storeId = $storeManager->getWebsite($this->_websiteId)->getDefaultStore()->getId();
+ }
+
+ // Set scope ID
+ switch ($this->_scope) {
+ case 'websites':
+ $this->_scopeId = $this->_websiteId;
+ break;
+ case 'stores':
+ $this->_scopeId = $this->_storeId;
+ break;
+ default:
+ $this->_scope = 'default';
+ $this->_scopeId = 0;
+ break;
+ }
+ }
+
+ /**
+ * Generate and save RSA keys
+ *
+ * @return array
+ */
+ public function generateKeys()
+ {
+ // Magento 2.4.4 switches to phpseclib3, use that if it exists
+ if (class_exists(\phpseclib3\Crypt\RSA::class, true)) {
+ $keypair = \phpseclib3\Crypt\RSA::createKey(2048);
+ $keys = [
+ "publickey" => $keypair->getPublicKey()->__toString(),
+ "privatekey" => $keypair->__toString()
+ ];
+ } else {
+ $rsa = new \phpseclib\Crypt\RSA();
+ $keys = $rsa->createKey(2048);
+ }
+
+ return $keys;
+ }
+
+ /**
+ * @return int
+ */
+ public function getWebsiteId()
+ {
+ return $this->_websiteId;
+ }
+
+ /**
+ * @return int
+ */
+ public function getStoreId()
+ {
+ return $this->_storeId;
+ }
+
+ /**
+ * @return string
+ */
+ public function getScope()
+ {
+ return $this->_scope;
+ }
+
+ /**
+ * @return int
+ */
+ public function getScopeId()
+ {
+ return $this->_scopeId;
+ }
+}
diff --git a/Model/Config/AutoKeyExchange.php b/Model/Config/AutoKeyExchange.php
index 5754e9b5c..c3e289b34 100755
--- a/Model/Config/AutoKeyExchange.php
+++ b/Model/Config/AutoKeyExchange.php
@@ -18,6 +18,7 @@
namespace Amazon\Pay\Model\Config;
use Amazon\Pay\Helper\Data as AmazonHelper;
+use Amazon\Pay\Helper\Key as KeyHelper;
use Amazon\Pay\Model\AmazonConfig;
use Magento\Framework\App\State;
use Magento\Framework\App\Cache\Type\Config as CacheTypeConfig;
@@ -74,6 +75,11 @@ class AutoKeyExchange
*/
private $amazonConfig;
+ /**
+ * @var KeyHelper
+ */
+ private $keyHelper;
+
/**
* @var \Magento\Framework\App\Config\ConfigResource\ConfigInterface
*/
@@ -114,11 +120,6 @@ class AutoKeyExchange
*/
private $state;
- /**
- * @var \Magento\Framework\App\Request\Http
- */
- private $request;
-
/**
* @var \Magento\Store\Model\StoreManagerInterface
*/
@@ -142,6 +143,7 @@ class AutoKeyExchange
/**
* @param AmazonHelper $coreHelper
* @param AmazonConfig $amazonConfig
+ * @param KeyHelper $keyHelper
* @param \Magento\Framework\App\Config\ConfigResource\ConfigInterface $config
* @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
* @param \Magento\Framework\App\ProductMetadataInterface $productMeta
@@ -149,7 +151,6 @@ class AutoKeyExchange
* @param \Magento\Framework\Message\ManagerInterface $messageManager
* @param \Magento\Framework\App\ResourceConnection $connection
* @param \Magento\Framework\App\Cache\Manager $cacheManager
- * @param \Magento\Framework\App\Request\Http $request
* @param State $state
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
* @param UrlInterface $backendUrl
@@ -161,6 +162,7 @@ class AutoKeyExchange
public function __construct(
AmazonHelper $amazonHelper,
AmazonConfig $amazonConfig,
+ KeyHelper $keyHelper,
\Magento\Framework\App\Config\ConfigResource\ConfigInterface $config,
\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
\Magento\Framework\App\ProductMetadataInterface $productMeta,
@@ -168,7 +170,6 @@ public function __construct(
\Magento\Framework\Message\ManagerInterface $messageManager,
\Magento\Framework\App\ResourceConnection $connection,
\Magento\Framework\App\Cache\Manager $cacheManager,
- \Magento\Framework\App\Request\Http $request,
\Magento\Framework\App\State $state,
\Magento\Store\Model\StoreManagerInterface $storeManager,
\Magento\Backend\Model\UrlInterface $backendUrl,
@@ -177,6 +178,7 @@ public function __construct(
) {
$this->amazonHelper = $amazonHelper;
$this->amazonConfig = $amazonConfig;
+ $this->keyHelper = $keyHelper;
$this->config = $config;
$this->scopeConfig = $scopeConfig;
$this->productMeta = $productMeta;
@@ -185,46 +187,16 @@ public function __construct(
$this->cacheManager = $cacheManager;
$this->connection = $connection;
$this->state = $state;
- $this->request = $request;
- $this->storeManager = $storeManager;
$this->mathRandom = $mathRandom;
$this->logger = $logger;
+ $this->storeManager = $storeManager;
$this->messageManager = $messageManager;
- // Find store ID and scope
- $this->_websiteId = $request->getParam('website', 0);
- $this->_storeId = $request->getParam('store', 0);
- $this->_scope = $request->getParam('scope');
-
- // Website scope
- if ($this->_websiteId) {
- $this->_scope = !$this->_scope ? 'websites' : $this->_scope;
- } else {
- $this->_websiteId = $storeManager->getWebsite()->getId();
- }
-
- // Store scope
- if ($this->_storeId) {
- $this->_websiteId = $this->storeManager->getStore($this->_storeId)->getWebsite()->getId();
- $this->_scope = !$this->_scope ? 'stores' : $this->_scope;
- } else {
- $this->_storeId = $storeManager->getWebsite($this->_websiteId)->getDefaultStore()->getId();
- }
-
- // Set scope ID
- switch ($this->_scope) {
- case 'websites':
- $this->_scopeId = $this->_websiteId;
- break;
- case 'stores':
- $this->_scopeId = $this->_storeId;
- break;
- default:
- $this->_scope = 'default';
- $this->_scopeId = 0;
- break;
- }
+ $this->_storeId = $keyHelper->getStoreId();
+ $this->_websiteId = $keyHelper->getWebsiteId();
+ $this->_scope = $keyHelper->getScope();
+ $this->_scopeId = $keyHelper->getScopeId();
}
/**
@@ -269,20 +241,9 @@ public function getListenerOrigins()
/**
* Generate and save RSA keys
*/
- public function generateKeys()
+ protected function generateKeys()
{
- // Magento 2.4.4 switches to phpseclib3, use that if it exists
- if (class_exists(\phpseclib3\Crypt\RSA::class, true)) {
- $keypair = \phpseclib3\Crypt\RSA::createKey(2048);
- $keys = [
- "publickey" => $keypair->getPublicKey()->__toString(),
- "privatekey" => $keypair->__toString()
- ];
- } else {
- $rsa = new \phpseclib\Crypt\RSA();
- $keys = $rsa->createKey(2048);
- }
-
+ $keys = $this->keyHelper->generateKeys();
$encrypt = $this->encryptor->encrypt($keys['privatekey']);
$this->config
@@ -363,9 +324,9 @@ public function getPrivateKey()
public function decryptPayload($payloadJson, $autoEnable = true, $autoSave = true)
{
try {
- $payload = (object) json_decode($payloadJson);
+ $payload = json_decode($payloadJson);
- $publicKeyId = urldecode($payload->publicKeyId);
+ $publicKeyId = urldecode($payload['publicKeyId'] ?? '');
$decryptedKey = null;
$success = openssl_private_decrypt(
diff --git a/Model/Config/KeyManagement.php b/Model/Config/KeyManagement.php
new file mode 100644
index 000000000..6deda3910
--- /dev/null
+++ b/Model/Config/KeyManagement.php
@@ -0,0 +1,120 @@
+request = $request;
+ $this->storeManager = $storeManager;
+
+ // Find store ID and scope
+ $this->_websiteId = $request->getParam('website', 0);
+ $this->_storeId = $request->getParam('store', 0);
+ $this->_scope = $request->getParam('scope');
+
+ // Website scope
+ if ($this->_websiteId) {
+ $this->_scope = !$this->_scope ? 'websites' : $this->_scope;
+ } else {
+ $this->_websiteId = $storeManager->getWebsite()->getId();
+ }
+
+ // Store scope
+ if ($this->_storeId) {
+ $this->_websiteId = $this->storeManager->getStore($this->_storeId)->getWebsite()->getId();
+ $this->_scope = !$this->_scope ? 'stores' : $this->_scope;
+ } else {
+ $this->_storeId = $storeManager->getWebsite($this->_websiteId)->getDefaultStore()->getId();
+ }
+
+ // Set scope ID
+ switch ($this->_scope) {
+ case 'websites':
+ $this->_scopeId = $this->_websiteId;
+ break;
+ case 'stores':
+ $this->_scopeId = $this->_storeId;
+ break;
+ default:
+ $this->_scope = 'default';
+ $this->_scopeId = 0;
+ break;
+ }
+ }
+
+ /**
+ * Generate and save RSA keys
+ *
+ * @return array
+ */
+ protected function generateKeys()
+ {
+ // Magento 2.4.4 switches to phpseclib3, use that if it exists
+ if (class_exists(\phpseclib3\Crypt\RSA::class, true)) {
+ $keypair = \phpseclib3\Crypt\RSA::createKey(2048);
+ $keys = [
+ "publickey" => $keypair->getPublicKey()->__toString(),
+ "privatekey" => $keypair->__toString()
+ ];
+ } else {
+ $rsa = new \phpseclib\Crypt\RSA();
+ $keys = $rsa->createKey(2048);
+ }
+
+ return $keys;
+ }
+}
diff --git a/Model/Config/KeyUpgrade.php b/Model/Config/KeyUpgrade.php
new file mode 100644
index 000000000..8d2a973f5
--- /dev/null
+++ b/Model/Config/KeyUpgrade.php
@@ -0,0 +1,375 @@
+scopeConfig = $scopeConfig;
+ $this->amazonConfig = $amazonConfig;
+ $this->keyHelper = $keyHelper;
+ $this->backendUrl = $backendUrl;
+ $this->curl = $curl;
+ $this->encryptor = $encryptor;
+ $this->config = $config;
+ $this->logger = $logger;
+ $this->_scope = $keyHelper->getScope();
+ $this->_scopeId = $keyHelper->getScopeId();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getPublicKeyId(
+ string $scopeType,
+ int $scopeCode,
+ string $accessKey
+ ) {
+ if (isset($this->keys) && !empty($this->keys)) {
+ $this->resetKeys();
+ }
+
+ $sellerId = $this->scopeConfig->getValue(
+ 'payment/amazon_payment/merchant_id',
+ $scopeType,
+ $scopeCode
+ );
+
+ $secretKey = $this->encryptor->decrypt($this->scopeConfig->getValue(
+ 'payment/amazon_payment/secret_key',
+ $scopeType,
+ $scopeCode
+ ));
+
+ $serviceUrl = $this->getServiceUrl($scopeType, $scopeCode);
+ if (empty($serviceUrl)) {
+ $this->logger->debug('Invalid Amazon Pay region detected in legacy credentials. ' .
+ 'Unable to perform automatic key upgrade.');
+ return '';
+ }
+
+ $resourcePathPrefix = $this->getReleaseMode();
+ $resourcePath = $resourcePathPrefix . '/v2/publicKeyId';
+
+ $timestamp = gmdate("Y-m-d\TH:i:s\\Z", time());
+ $params = [
+ 'AWSAccessKeyId' => $accessKey,
+ 'Action' => self::ACTION,
+ 'SellerId' => $sellerId,
+ 'SignatureMethod' => self::SIGNATURE_METHOD,
+ 'SignatureVersion' =>self::SIGNATURE_VERSION,
+ 'Timestamp' => $timestamp
+ ];
+
+ $stringToSign = $this->generateStringToSign($params, $serviceUrl, $resourcePath);
+ $signature = base64_encode(hash_hmac('sha256', $stringToSign, $secretKey, true));
+ $publicKey = str_replace("\r", '', $this->getKeyPair()['publickey']);
+
+ $request = $this->createCurlRequest($serviceUrl, $resourcePath, $params, $signature, $publicKey);
+
+ $this->curl->setOption(CURLOPT_RETURNTRANSFER, 1);
+ try {
+ $this->curl->get($request);
+ } catch (\Exception $e) {
+ $this->logger->error('Unable to successfully request a key upgrade: ' . $e->getMessage());
+ return '';
+ }
+ $output = $this->curl->getBody();
+
+ $responseObj = json_decode($output);
+ $publicKeyId = $responseObj->publicKeyId ?? '';
+ if (empty($publicKeyId)) {
+ $this->logger->debug('Unable to automatically upgrade public key for Merchant ID ' . $sellerId .
+ ', Access Key ' . $accessKey . ': ' . json_encode($responseObj));
+ }
+
+ return $publicKeyId;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getKeyPair()
+ {
+ if (empty($this->keys)) {
+ $this->keys = $this->keyHelper->generateKeys();
+ }
+
+ return $this->keys;
+ }
+
+ /**
+ * Return true if this scope still has a CV1 access key set
+ *
+ * @return mixed
+ */
+ public function getMwsKeyForScope()
+ {
+ $accessKey = $this->scopeConfig->getValue(
+ 'payment/amazon_payment/access_key',
+ $this->_scope,
+ $this->_scopeId
+ );
+
+ return $accessKey;
+ }
+
+ /**
+ * Check if V2 public key ID already exists
+ *
+ * @return mixed
+ */
+ public function getExistingPublicKeyId()
+ {
+ return $this->amazonConfig->getPublicKeyId($this->_scope, $this->_scopeId);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function updateKeysInConfig(
+ $publicKeyId,
+ $scopeType,
+ $scopeId
+ ) {
+ //Save new public key and remove old access key
+ $this->config->saveConfig(
+ 'payment/amazon_payment_v2/public_key_id',
+ $publicKeyId,
+ $scopeType,
+ $scopeId
+ );
+
+ $this->config->deleteConfig(
+ 'payment/amazon_payment/access_key',
+ $scopeType,
+ $scopeId
+ );
+
+ // Save private key
+ $keyPair = $this->getKeyPair();
+ $privateKeyValue = $this->encryptor->encrypt($keyPair['privatekey']);
+ $this->config->saveConfig(
+ 'payment/amazon_payment_v2/private_key',
+ $privateKeyValue,
+ $scopeType,
+ $scopeId
+ );
+ }
+
+ /**
+ * Generate config object for manual upgrade from admin section
+ *
+ * @return array
+ */
+ public function getJsonAmazonKeyUpgradeConfig()
+ {
+ return [
+ 'scope' => $this->_scope,
+ 'scopeCode' => $this->_scopeId,
+ 'accessKey' => $this->getMwsKeyForScope(),
+ 'keyUpgradeUrl' => $this->backendUrl->getUrl('amazon_pay/pay/manualKeyUpgrade')
+ ];
+ }
+
+ /**
+ * Empty keypair for new public key ID request
+ *
+ * @return void
+ */
+ private function resetKeys()
+ {
+ $this->keys = [];
+ }
+
+ /**
+ * Get request domain based on AP region, e.g. 'pay-api.amazon.eu'
+ *
+ * @param string $scopeType
+ * @param int $scopeCode
+ * @return string
+ */
+ private function getServiceUrl(string $scopeType, int $scopeCode)
+ {
+ $urlMap = [
+ 'us' => 'pay-api.amazon.com',
+ 'de' => 'pay-api.amazon.eu',
+ 'uk' => 'pay-api.amazon.eu',
+ 'jp' => 'pay-api.amazon.jp'
+ ];
+ $region = $this->amazonConfig->getRegion($scopeType, $scopeCode);
+
+ return $urlMap[$region];
+ }
+
+ /**
+ * Get resource path prefix based on release mode (live or sandbox)
+ *
+ * @return string
+ */
+ private function getReleaseMode()
+ {
+ // Live is currently the only available path
+ return '/live';
+ }
+
+ /**
+ * Create the request string from which a signature will be calculated
+ *
+ * @param array $params
+ * @param string $serviceUrl
+ * @param string $resourcePath
+ * @return string
+ */
+ private function generateStringToSign(array &$params, string $serviceUrl, string $resourcePath)
+ {
+ ksort($params, SORT_NUMERIC);
+
+ $uri = new Uri($serviceUrl);
+ $stringToSign = 'GET' . PHP_EOL
+ . $uri->getPath() . PHP_EOL
+ . $resourcePath . PHP_EOL
+ . http_build_query($params, "", "&", PHP_QUERY_RFC3986);
+
+ return $stringToSign;
+ }
+
+ /**
+ * Create a request executable by a CurlHandle
+ *
+ * @param string $domain
+ * @param string $resourcePath
+ * @param array $params
+ * @param string $signature
+ * @param string $publicKey
+ * @return string
+ */
+ private function createCurlRequest(
+ string $domain,
+ string $resourcePath,
+ array $params,
+ string $signature,
+ string $publicKey
+ ) {
+ $params['PublicKey'] = $publicKey;
+ $params['Signature'] = $signature;
+
+ $queryString = http_build_query($params, '', '&', PHP_QUERY_RFC3986);
+
+ $request = $domain
+ . $resourcePath
+ . '?' . str_replace('SellerId', 'MerchantId', $queryString);
+
+ return 'https://' . $request;
+ }
+}
diff --git a/README.md b/README.md
index e43164907..55335adf1 100755
--- a/README.md
+++ b/README.md
@@ -48,7 +48,7 @@ The following table provides an overview on which Git branch is compatible to wh
Magento Version | Github Branch | Latest release
---|---|---
2.2.6 - 2.2.11 (EOL) | [V2checkout-1.2.x](https://github.com/amzn/amazon-payments-magento-2-plugin/tree/V2checkout-1.2.x) | 1.20.0 (EOL)
-2.3.0 - 2.4.x | [master](https://github.com/amzn/amazon-payments-magento-2-plugin/tree/master) | 5.14.3
+2.3.0 - 2.4.x | [master](https://github.com/amzn/amazon-payments-magento-2-plugin/tree/master) | 5.15.0
## Release Notes
See [CHANGELOG.md](/CHANGELOG.md)
diff --git a/Setup/Patch/Data/PerformKeyUpgrade.php b/Setup/Patch/Data/PerformKeyUpgrade.php
new file mode 100644
index 000000000..4df74ed88
--- /dev/null
+++ b/Setup/Patch/Data/PerformKeyUpgrade.php
@@ -0,0 +1,175 @@
+ 'payment/amazon_payment_v2/active',
+ 'payment/amazon_payment/merchant_id' => 'payment/amazon_payment_v2/merchant_id',
+ 'payment/amazon_payment/client_id' => 'payment/amazon_payment_v2/store_id',
+ 'payment/amazon_payment/lwa_enabled' => 'payment/amazon_payment_v2/lwa_enabled',
+ 'payment/amazon_payment/payment_action' => 'payment/amazon_payment_v2/payment_action',
+ 'payment/amazon_payment/button_color' => 'payment/amazon_payment_v2/button_color',
+ 'payment/amazon_payment/allowed_ips' => 'payment/amazon_payment_v2/allowed_ips'
+ ];
+
+ /**
+ * @var KeyUpgradeInterface
+ */
+ private $keyUpgrade;
+
+ /**
+ * @var ConfigInterface
+ */
+ private $config;
+
+ /**
+ * @var EncryptorInterface
+ */
+ private $encryptor;
+
+ /**
+ * @var ModuleDataSetupInterface
+ */
+ private $moduleDataSetup;
+
+ /**
+ * @param KeyUpgradeInterface $keyUpgrade
+ * @param ConfigInterface $config
+ * @param EncryptorInterface $encryptor
+ * @param ModuleDataSetupInterface $moduleDataSetup
+ */
+ public function __construct(
+ KeyUpgradeInterface $keyUpgrade,
+ ConfigInterface $config,
+ EncryptorInterface $encryptor,
+ ModuleDataSetupInterface $moduleDataSetup
+ ) {
+ $this->keyUpgrade = $keyUpgrade;
+ $this->config = $config;
+ $this->encryptor = $encryptor;
+ $this->moduleDataSetup = $moduleDataSetup;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function apply()
+ {
+ $accessKeys = $this->getAccessKeysByScope();
+ foreach ($accessKeys as [
+ 'scope' => $scopeType,
+ 'scope_id' => $scopeId,
+ 'value' => $accessKey
+ ]) {
+ $publicKeyId = $this->keyUpgrade->getPublicKeyId(
+ $scopeType,
+ $scopeId,
+ $accessKey
+ );
+
+ if (!empty($publicKeyId)) {
+ $this->keyUpgrade->updateKeysInConfig(
+ $publicKeyId,
+ $scopeType,
+ $scopeId
+ );
+ }
+ }
+
+ // Upgrade all other configs
+ $savedConfigs = $this->getSavedV1Configs();
+ foreach ($savedConfigs as [
+ 'scope_id' => $scopeId,
+ 'scope' => $scopeType,
+ 'path' => $path,
+ 'value' => $value
+ ]) {
+ $this->config->saveConfig(
+ self::PATH_TRANSLATION_MAP[$path],
+ $value,
+ $scopeType,
+ $scopeId
+ );
+ }
+ }
+
+ /**
+ * Return a list of scopes with unique access key IDs
+ *
+ * @return array
+ */
+ private function getAccessKeysByScope()
+ {
+ $conn = $this->moduleDataSetup->getConnection();
+ $select = $conn->select()
+ ->from('core_config_data', ['scope_id', 'scope', 'value'])
+ ->where('path = ?', 'payment/amazon_payment/access_key')
+ ->order('scope_id');
+
+ return $conn->fetchAll($select);
+ }
+
+ /**
+ * Return all explicitly saved Amazon Pay CV1 config values that need to have
+ * their paths updated
+ *
+ * @return array
+ */
+ private function getSavedV1Configs()
+ {
+ $conn = $this->moduleDataSetup->getConnection();
+ $select = $conn->select()
+ ->from('core_config_data', ['scope_id', 'scope', 'path', 'value'])
+ ->where('path in (?)', array_keys(self::PATH_TRANSLATION_MAP))
+ ->order('scope_id');
+
+ return $conn->fetchAll($select);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public static function getDependencies()
+ {
+ return [];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getAliases()
+ {
+ return [];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public static function getVersion()
+ {
+ return '5.0.0';
+ }
+}
diff --git a/composer.json b/composer.json
index 8972185b0..3c688a3de 100755
--- a/composer.json
+++ b/composer.json
@@ -2,7 +2,7 @@
"name": "amzn/amazon-pay-magento-2-module",
"description": "Official Magento2 Plugin to integrate with Amazon Pay",
"type": "magento2-module",
- "version": "5.14.3",
+ "version": "5.15.0",
"license": [
"Apache-2.0"
],
diff --git a/etc/di.xml b/etc/di.xml
index 258c6658a..e4e0f7945 100755
--- a/etc/di.xml
+++ b/etc/di.xml
@@ -21,6 +21,7 @@
Amazon Pay will redirect to this URL if the customer clicks ""Cancel Amazon Pay checkout and return to [merchant site]"" from the Amazon-hosted page. Do not use a leading slash. Leave blank to return the customer to the last page visited before checkout (EU/UK regions only).","Unsachgemäße Änderungen können zu einer fehlerhaften Integration führen. Ändern Sie diesen Wert nur bei Bedarf.
Ihre Kunden werden zu dieser URL weitergeleitet, wenn sie während des Bezahlvorgangs auf „Amazon Pay-Bezahlvorgang abbrechen und zu [Händlername] zurückkehren“ klicken. Standardmäßig werden Ihre Kunden auf die Warenkorbseite geleitet."
"Amazon Sign In cancel URL Path","URL-Pfad bei Abbruch der Anmeldung mit Amazon (nur für die Regionen EU/UK)"
"Amazon Pay Sign In could potentially break if this value is modified. Do it only if it is needed by your website.
Amazon Pay will redirect to this URL if the customer clicks ""Cancel"" from the Amazon-hosted page. Do not use a leading slash. Leave blank to return the customer to the last page visited before sign in (EU/UK regions only).","Unsachgemäße Änderungen können zu einer fehlerhaften Integration führen. Ändern Sie diesen Wert nur bei Bedarf.
Ihre Kunden werden zu dieser URL weitergeleitet, wenn sie auf der Seite „Mit Amazon anmelden“ auf „Abbrechen“ klicken. Tragen Sie keinen vorangestellten Schrägstrich ein. Standardmäßig werden Ihre Kunden zur vorherigen Seite zurückgeleitet."
+"Amazon Pay will not be functional until the legacy keys associated with your configuration are updated. Click the button below to upgrade your credentials.","Amazon Pay funktioniert erst, wenn die mit Ihrer Konfiguration verknüpften Legacy-Schlüssel aktualisiert wurden. Klicken Sie auf die Schaltfläche unten, um Ihre Anmeldeinformationen zu aktualisieren."
+"Upgrade your legacy Amazon Pay credentials","Aktualisieren Sie Ihre alten Amazon Pay-Anmeldeinformationen"
+"Updating your config with new keys, please wait...","Aktualisieren Ihrer Konfiguration mit neuen Schlüsseln, bitte warten..."
diff --git a/i18n/de_CH.csv b/i18n/de_CH.csv
index 2847344df..d8492cbeb 100644
--- a/i18n/de_CH.csv
+++ b/i18n/de_CH.csv
@@ -193,3 +193,6 @@
"Amazon Pay Checkout could potentially break if this value is modified. Do it only if it is needed by your website.
Amazon Pay will redirect to this URL if the customer clicks ""Cancel Amazon Pay checkout and return to [merchant site]"" from the Amazon-hosted page. Do not use a leading slash. Leave blank to return the customer to the last page visited before checkout (EU/UK regions only).","Unsachgemäße Änderungen können zu einer fehlerhaften Integration führen. Ändern Sie diesen Wert nur bei Bedarf.
Ihre Kunden werden zu dieser URL weitergeleitet, wenn sie während des Bezahlvorgangs auf „Amazon Pay-Bezahlvorgang abbrechen und zu [Händlername] zurückkehren“ klicken. Standardmäßig werden Ihre Kunden auf die Warenkorbseite geleitet."
"Amazon Sign In cancel URL Path","URL-Pfad bei Abbruch der Anmeldung mit Amazon (nur für die Regionen EU/UK)"
"Amazon Pay Sign In could potentially break if this value is modified. Do it only if it is needed by your website.
Amazon Pay will redirect to this URL if the customer clicks ""Cancel"" from the Amazon-hosted page. Do not use a leading slash. Leave blank to return the customer to the last page visited before sign in (EU/UK regions only).","Unsachgemäße Änderungen können zu einer fehlerhaften Integration führen. Ändern Sie diesen Wert nur bei Bedarf.
Ihre Kunden werden zu dieser URL weitergeleitet, wenn sie auf der Seite „Mit Amazon anmelden“ auf „Abbrechen“ klicken. Tragen Sie keinen vorangestellten Schrägstrich ein. Standardmäßig werden Ihre Kunden zur vorherigen Seite zurückgeleitet."
+"Amazon Pay will not be functional until the legacy keys associated with your configuration are updated. Click the button below to upgrade your credentials.","Amazon Pay funktioniert erst, wenn die mit Ihrer Konfiguration verknüpften Legacy-Schlüssel aktualisiert wurden. Klicken Sie auf die Schaltfläche unten, um Ihre Anmeldeinformationen zu aktualisieren."
+"Upgrade your legacy Amazon Pay credentials","Aktualisieren Sie Ihre alten Amazon Pay-Anmeldeinformationen"
+"Updating your config with new keys, please wait...","Aktualisieren Ihrer Konfiguration mit neuen Schlüsseln, bitte warten..."
diff --git a/i18n/de_DE.csv b/i18n/de_DE.csv
index 2847344df..d8492cbeb 100644
--- a/i18n/de_DE.csv
+++ b/i18n/de_DE.csv
@@ -193,3 +193,6 @@
"Amazon Pay Checkout could potentially break if this value is modified. Do it only if it is needed by your website.
Amazon Pay will redirect to this URL if the customer clicks ""Cancel Amazon Pay checkout and return to [merchant site]"" from the Amazon-hosted page. Do not use a leading slash. Leave blank to return the customer to the last page visited before checkout (EU/UK regions only).","Unsachgemäße Änderungen können zu einer fehlerhaften Integration führen. Ändern Sie diesen Wert nur bei Bedarf.
Ihre Kunden werden zu dieser URL weitergeleitet, wenn sie während des Bezahlvorgangs auf „Amazon Pay-Bezahlvorgang abbrechen und zu [Händlername] zurückkehren“ klicken. Standardmäßig werden Ihre Kunden auf die Warenkorbseite geleitet."
"Amazon Sign In cancel URL Path","URL-Pfad bei Abbruch der Anmeldung mit Amazon (nur für die Regionen EU/UK)"
"Amazon Pay Sign In could potentially break if this value is modified. Do it only if it is needed by your website.
Amazon Pay will redirect to this URL if the customer clicks ""Cancel"" from the Amazon-hosted page. Do not use a leading slash. Leave blank to return the customer to the last page visited before sign in (EU/UK regions only).","Unsachgemäße Änderungen können zu einer fehlerhaften Integration führen. Ändern Sie diesen Wert nur bei Bedarf.
Ihre Kunden werden zu dieser URL weitergeleitet, wenn sie auf der Seite „Mit Amazon anmelden“ auf „Abbrechen“ klicken. Tragen Sie keinen vorangestellten Schrägstrich ein. Standardmäßig werden Ihre Kunden zur vorherigen Seite zurückgeleitet."
+"Amazon Pay will not be functional until the legacy keys associated with your configuration are updated. Click the button below to upgrade your credentials.","Amazon Pay funktioniert erst, wenn die mit Ihrer Konfiguration verknüpften Legacy-Schlüssel aktualisiert wurden. Klicken Sie auf die Schaltfläche unten, um Ihre Anmeldeinformationen zu aktualisieren."
+"Upgrade your legacy Amazon Pay credentials","Aktualisieren Sie Ihre alten Amazon Pay-Anmeldeinformationen"
+"Updating your config with new keys, please wait...","Aktualisieren Ihrer Konfiguration mit neuen Schlüsseln, bitte warten..."
diff --git a/i18n/en_GB.csv b/i18n/en_GB.csv
index a9716cfb5..5f85db408 100644
--- a/i18n/en_GB.csv
+++ b/i18n/en_GB.csv
@@ -134,3 +134,6 @@ Logging,Logging
"Valued customer","Valued customer"
"Unfortunately Amazon Pay declined the payment for your order in our online shop %storeName, please try placing the order again with another payment method.","Unfortunately Amazon Pay declined the payment for your order in our online shop %storeName, please try placing the order again with another payment method."
"Kind regards","Kind regards"
+"Amazon Pay will not be functional until the legacy keys associated with your configuration are updated. Click the button below to upgrade your credentials.","Amazon Pay will not be functional until the legacy keys associated with your configuration are updated. Click the button below to upgrade your credentials."
+"Upgrade your legacy Amazon Pay credentials","Upgrade your legacy Amazon Pay credentials"
+"Updating your config with new keys, please wait...","Updating your config with new keys, please wait..."
diff --git a/i18n/en_US.csv b/i18n/en_US.csv
index d3ab486a1..37a27b7ce 100644
--- a/i18n/en_US.csv
+++ b/i18n/en_US.csv
@@ -136,3 +136,6 @@
"Kind regards","Kind regards"
"Yes","Enabled"
"No","Disabled"
+"Amazon Pay will not be functional until the legacy keys associated with your configuration are updated. Click the button below to upgrade your credentials.","Amazon Pay will not be functional until the legacy keys associated with your configuration are updated. Click the button below to upgrade your credentials."
+"Upgrade your legacy Amazon Pay credentials","Upgrade your legacy Amazon Pay credentials"
+"Updating your config with new keys, please wait...","Updating your config with new keys, please wait..."
diff --git a/i18n/es_AR.csv b/i18n/es_AR.csv
index bfd8c6756..d715d6001 100644
--- a/i18n/es_AR.csv
+++ b/i18n/es_AR.csv
@@ -198,3 +198,6 @@ Nota: El botón de Amazon Pay solo podrán verlo los clientes con las direccione
"Amazon Pay Checkout could potentially break if this value is modified. Do it only if it is needed by your website.
Amazon Pay will redirect to this URL if the customer clicks ""Cancel Amazon Pay checkout and return to [merchant site]"" from the Amazon-hosted page. Do not use a leading slash. Leave blank to return the customer to the last page visited before checkout (EU/UK regions only).","Las modificaciones inadecuadas pueden interrumpir la integración. Solo debes cambiar este valor si es necesario.
Se dirigirá a tus clientes a esta URL cuando hagan clic en “Cancelar pago de Amazon Pay y volver a [nombre del vendedor]” durante el proceso de pago. De forma predeterminada, tus clientes volverán a la página previa al pago."
"Amazon Sign In cancel URL Path","Ruta de URL de cancelación de inicio de sesión de Amazon (solo regiones de Reino Unido/UE)"
"Amazon Pay Sign In could potentially break if this value is modified. Do it only if it is needed by your website.
Amazon Pay will redirect to this URL if the customer clicks ""Cancel"" from the Amazon-hosted page. Do not use a leading slash. Leave blank to return the customer to the last page visited before sign in (EU/UK regions only).","Las modificaciones inadecuadas pueden interrumpir la integración. Solo debes cambiar este valor si es necesario.
Se redirigirá a tus clientes a esta URL cuando hagan clic en “Cancelar” en la página de Iniciar sesión con Amazon. No incluyas una barra diagonal al principio. De forma predeterminada, los clientes volverán a la página anterior."
+"Amazon Pay will not be functional until the legacy keys associated with your configuration are updated. Click the button below to upgrade your credentials.","Amazon Pay no funcionará hasta que se actualicen las claves heredadas asociadas con su configuración. Haga clic en el botón de abajo para actualizar sus credenciales."
+"Upgrade your legacy Amazon Pay credentials","Actualice sus credenciales heredadas de Amazon Pay"
+"Updating your config with new keys, please wait...","Actualizando su configuración con claves nuevas, por favor espere..."
diff --git a/i18n/es_CL.csv b/i18n/es_CL.csv
index bfd8c6756..d715d6001 100644
--- a/i18n/es_CL.csv
+++ b/i18n/es_CL.csv
@@ -198,3 +198,6 @@ Nota: El botón de Amazon Pay solo podrán verlo los clientes con las direccione
"Amazon Pay Checkout could potentially break if this value is modified. Do it only if it is needed by your website.
Amazon Pay will redirect to this URL if the customer clicks ""Cancel Amazon Pay checkout and return to [merchant site]"" from the Amazon-hosted page. Do not use a leading slash. Leave blank to return the customer to the last page visited before checkout (EU/UK regions only).","Las modificaciones inadecuadas pueden interrumpir la integración. Solo debes cambiar este valor si es necesario.
Se dirigirá a tus clientes a esta URL cuando hagan clic en “Cancelar pago de Amazon Pay y volver a [nombre del vendedor]” durante el proceso de pago. De forma predeterminada, tus clientes volverán a la página previa al pago."
"Amazon Sign In cancel URL Path","Ruta de URL de cancelación de inicio de sesión de Amazon (solo regiones de Reino Unido/UE)"
"Amazon Pay Sign In could potentially break if this value is modified. Do it only if it is needed by your website.
Amazon Pay will redirect to this URL if the customer clicks ""Cancel"" from the Amazon-hosted page. Do not use a leading slash. Leave blank to return the customer to the last page visited before sign in (EU/UK regions only).","Las modificaciones inadecuadas pueden interrumpir la integración. Solo debes cambiar este valor si es necesario.
Se redirigirá a tus clientes a esta URL cuando hagan clic en “Cancelar” en la página de Iniciar sesión con Amazon. No incluyas una barra diagonal al principio. De forma predeterminada, los clientes volverán a la página anterior."
+"Amazon Pay will not be functional until the legacy keys associated with your configuration are updated. Click the button below to upgrade your credentials.","Amazon Pay no funcionará hasta que se actualicen las claves heredadas asociadas con su configuración. Haga clic en el botón de abajo para actualizar sus credenciales."
+"Upgrade your legacy Amazon Pay credentials","Actualice sus credenciales heredadas de Amazon Pay"
+"Updating your config with new keys, please wait...","Actualizando su configuración con claves nuevas, por favor espere..."
diff --git a/i18n/es_CO.csv b/i18n/es_CO.csv
index bfd8c6756..d715d6001 100644
--- a/i18n/es_CO.csv
+++ b/i18n/es_CO.csv
@@ -198,3 +198,6 @@ Nota: El botón de Amazon Pay solo podrán verlo los clientes con las direccione
"Amazon Pay Checkout could potentially break if this value is modified. Do it only if it is needed by your website.
Amazon Pay will redirect to this URL if the customer clicks ""Cancel Amazon Pay checkout and return to [merchant site]"" from the Amazon-hosted page. Do not use a leading slash. Leave blank to return the customer to the last page visited before checkout (EU/UK regions only).","Las modificaciones inadecuadas pueden interrumpir la integración. Solo debes cambiar este valor si es necesario.
Se dirigirá a tus clientes a esta URL cuando hagan clic en “Cancelar pago de Amazon Pay y volver a [nombre del vendedor]” durante el proceso de pago. De forma predeterminada, tus clientes volverán a la página previa al pago."
"Amazon Sign In cancel URL Path","Ruta de URL de cancelación de inicio de sesión de Amazon (solo regiones de Reino Unido/UE)"
"Amazon Pay Sign In could potentially break if this value is modified. Do it only if it is needed by your website.
Amazon Pay will redirect to this URL if the customer clicks ""Cancel"" from the Amazon-hosted page. Do not use a leading slash. Leave blank to return the customer to the last page visited before sign in (EU/UK regions only).","Las modificaciones inadecuadas pueden interrumpir la integración. Solo debes cambiar este valor si es necesario.
Se redirigirá a tus clientes a esta URL cuando hagan clic en “Cancelar” en la página de Iniciar sesión con Amazon. No incluyas una barra diagonal al principio. De forma predeterminada, los clientes volverán a la página anterior."
+"Amazon Pay will not be functional until the legacy keys associated with your configuration are updated. Click the button below to upgrade your credentials.","Amazon Pay no funcionará hasta que se actualicen las claves heredadas asociadas con su configuración. Haga clic en el botón de abajo para actualizar sus credenciales."
+"Upgrade your legacy Amazon Pay credentials","Actualice sus credenciales heredadas de Amazon Pay"
+"Updating your config with new keys, please wait...","Actualizando su configuración con claves nuevas, por favor espere..."
diff --git a/i18n/es_CR.csv b/i18n/es_CR.csv
index bfd8c6756..d715d6001 100644
--- a/i18n/es_CR.csv
+++ b/i18n/es_CR.csv
@@ -198,3 +198,6 @@ Nota: El botón de Amazon Pay solo podrán verlo los clientes con las direccione
"Amazon Pay Checkout could potentially break if this value is modified. Do it only if it is needed by your website.
Amazon Pay will redirect to this URL if the customer clicks ""Cancel Amazon Pay checkout and return to [merchant site]"" from the Amazon-hosted page. Do not use a leading slash. Leave blank to return the customer to the last page visited before checkout (EU/UK regions only).","Las modificaciones inadecuadas pueden interrumpir la integración. Solo debes cambiar este valor si es necesario.
Se dirigirá a tus clientes a esta URL cuando hagan clic en “Cancelar pago de Amazon Pay y volver a [nombre del vendedor]” durante el proceso de pago. De forma predeterminada, tus clientes volverán a la página previa al pago."
"Amazon Sign In cancel URL Path","Ruta de URL de cancelación de inicio de sesión de Amazon (solo regiones de Reino Unido/UE)"
"Amazon Pay Sign In could potentially break if this value is modified. Do it only if it is needed by your website.
Amazon Pay will redirect to this URL if the customer clicks ""Cancel"" from the Amazon-hosted page. Do not use a leading slash. Leave blank to return the customer to the last page visited before sign in (EU/UK regions only).","Las modificaciones inadecuadas pueden interrumpir la integración. Solo debes cambiar este valor si es necesario.
Se redirigirá a tus clientes a esta URL cuando hagan clic en “Cancelar” en la página de Iniciar sesión con Amazon. No incluyas una barra diagonal al principio. De forma predeterminada, los clientes volverán a la página anterior."
+"Amazon Pay will not be functional until the legacy keys associated with your configuration are updated. Click the button below to upgrade your credentials.","Amazon Pay no funcionará hasta que se actualicen las claves heredadas asociadas con su configuración. Haga clic en el botón de abajo para actualizar sus credenciales."
+"Upgrade your legacy Amazon Pay credentials","Actualice sus credenciales heredadas de Amazon Pay"
+"Updating your config with new keys, please wait...","Actualizando su configuración con claves nuevas, por favor espere..."
diff --git a/i18n/es_ES.csv b/i18n/es_ES.csv
index bfd8c6756..d715d6001 100644
--- a/i18n/es_ES.csv
+++ b/i18n/es_ES.csv
@@ -198,3 +198,6 @@ Nota: El botón de Amazon Pay solo podrán verlo los clientes con las direccione
"Amazon Pay Checkout could potentially break if this value is modified. Do it only if it is needed by your website.
Amazon Pay will redirect to this URL if the customer clicks ""Cancel Amazon Pay checkout and return to [merchant site]"" from the Amazon-hosted page. Do not use a leading slash. Leave blank to return the customer to the last page visited before checkout (EU/UK regions only).","Las modificaciones inadecuadas pueden interrumpir la integración. Solo debes cambiar este valor si es necesario.
Se dirigirá a tus clientes a esta URL cuando hagan clic en “Cancelar pago de Amazon Pay y volver a [nombre del vendedor]” durante el proceso de pago. De forma predeterminada, tus clientes volverán a la página previa al pago."
"Amazon Sign In cancel URL Path","Ruta de URL de cancelación de inicio de sesión de Amazon (solo regiones de Reino Unido/UE)"
"Amazon Pay Sign In could potentially break if this value is modified. Do it only if it is needed by your website.
Amazon Pay will redirect to this URL if the customer clicks ""Cancel"" from the Amazon-hosted page. Do not use a leading slash. Leave blank to return the customer to the last page visited before sign in (EU/UK regions only).","Las modificaciones inadecuadas pueden interrumpir la integración. Solo debes cambiar este valor si es necesario.
Se redirigirá a tus clientes a esta URL cuando hagan clic en “Cancelar” en la página de Iniciar sesión con Amazon. No incluyas una barra diagonal al principio. De forma predeterminada, los clientes volverán a la página anterior."
+"Amazon Pay will not be functional until the legacy keys associated with your configuration are updated. Click the button below to upgrade your credentials.","Amazon Pay no funcionará hasta que se actualicen las claves heredadas asociadas con su configuración. Haga clic en el botón de abajo para actualizar sus credenciales."
+"Upgrade your legacy Amazon Pay credentials","Actualice sus credenciales heredadas de Amazon Pay"
+"Updating your config with new keys, please wait...","Actualizando su configuración con claves nuevas, por favor espere..."
diff --git a/i18n/es_MX.csv b/i18n/es_MX.csv
index bfd8c6756..d715d6001 100644
--- a/i18n/es_MX.csv
+++ b/i18n/es_MX.csv
@@ -198,3 +198,6 @@ Nota: El botón de Amazon Pay solo podrán verlo los clientes con las direccione
"Amazon Pay Checkout could potentially break if this value is modified. Do it only if it is needed by your website.
Amazon Pay will redirect to this URL if the customer clicks ""Cancel Amazon Pay checkout and return to [merchant site]"" from the Amazon-hosted page. Do not use a leading slash. Leave blank to return the customer to the last page visited before checkout (EU/UK regions only).","Las modificaciones inadecuadas pueden interrumpir la integración. Solo debes cambiar este valor si es necesario.
Se dirigirá a tus clientes a esta URL cuando hagan clic en “Cancelar pago de Amazon Pay y volver a [nombre del vendedor]” durante el proceso de pago. De forma predeterminada, tus clientes volverán a la página previa al pago."
"Amazon Sign In cancel URL Path","Ruta de URL de cancelación de inicio de sesión de Amazon (solo regiones de Reino Unido/UE)"
"Amazon Pay Sign In could potentially break if this value is modified. Do it only if it is needed by your website.
Amazon Pay will redirect to this URL if the customer clicks ""Cancel"" from the Amazon-hosted page. Do not use a leading slash. Leave blank to return the customer to the last page visited before sign in (EU/UK regions only).","Las modificaciones inadecuadas pueden interrumpir la integración. Solo debes cambiar este valor si es necesario.
Se redirigirá a tus clientes a esta URL cuando hagan clic en “Cancelar” en la página de Iniciar sesión con Amazon. No incluyas una barra diagonal al principio. De forma predeterminada, los clientes volverán a la página anterior."
+"Amazon Pay will not be functional until the legacy keys associated with your configuration are updated. Click the button below to upgrade your credentials.","Amazon Pay no funcionará hasta que se actualicen las claves heredadas asociadas con su configuración. Haga clic en el botón de abajo para actualizar sus credenciales."
+"Upgrade your legacy Amazon Pay credentials","Actualice sus credenciales heredadas de Amazon Pay"
+"Updating your config with new keys, please wait...","Actualizando su configuración con claves nuevas, por favor espere..."
diff --git a/i18n/es_PA.csv b/i18n/es_PA.csv
index bfd8c6756..d715d6001 100644
--- a/i18n/es_PA.csv
+++ b/i18n/es_PA.csv
@@ -198,3 +198,6 @@ Nota: El botón de Amazon Pay solo podrán verlo los clientes con las direccione
"Amazon Pay Checkout could potentially break if this value is modified. Do it only if it is needed by your website.
Amazon Pay will redirect to this URL if the customer clicks ""Cancel Amazon Pay checkout and return to [merchant site]"" from the Amazon-hosted page. Do not use a leading slash. Leave blank to return the customer to the last page visited before checkout (EU/UK regions only).","Las modificaciones inadecuadas pueden interrumpir la integración. Solo debes cambiar este valor si es necesario.
Se dirigirá a tus clientes a esta URL cuando hagan clic en “Cancelar pago de Amazon Pay y volver a [nombre del vendedor]” durante el proceso de pago. De forma predeterminada, tus clientes volverán a la página previa al pago."
"Amazon Sign In cancel URL Path","Ruta de URL de cancelación de inicio de sesión de Amazon (solo regiones de Reino Unido/UE)"
"Amazon Pay Sign In could potentially break if this value is modified. Do it only if it is needed by your website.
Amazon Pay will redirect to this URL if the customer clicks ""Cancel"" from the Amazon-hosted page. Do not use a leading slash. Leave blank to return the customer to the last page visited before sign in (EU/UK regions only).","Las modificaciones inadecuadas pueden interrumpir la integración. Solo debes cambiar este valor si es necesario.
Se redirigirá a tus clientes a esta URL cuando hagan clic en “Cancelar” en la página de Iniciar sesión con Amazon. No incluyas una barra diagonal al principio. De forma predeterminada, los clientes volverán a la página anterior."
+"Amazon Pay will not be functional until the legacy keys associated with your configuration are updated. Click the button below to upgrade your credentials.","Amazon Pay no funcionará hasta que se actualicen las claves heredadas asociadas con su configuración. Haga clic en el botón de abajo para actualizar sus credenciales."
+"Upgrade your legacy Amazon Pay credentials","Actualice sus credenciales heredadas de Amazon Pay"
+"Updating your config with new keys, please wait...","Actualizando su configuración con claves nuevas, por favor espere..."
diff --git a/i18n/es_PE.csv b/i18n/es_PE.csv
index bfd8c6756..d715d6001 100644
--- a/i18n/es_PE.csv
+++ b/i18n/es_PE.csv
@@ -198,3 +198,6 @@ Nota: El botón de Amazon Pay solo podrán verlo los clientes con las direccione
"Amazon Pay Checkout could potentially break if this value is modified. Do it only if it is needed by your website.
Amazon Pay will redirect to this URL if the customer clicks ""Cancel Amazon Pay checkout and return to [merchant site]"" from the Amazon-hosted page. Do not use a leading slash. Leave blank to return the customer to the last page visited before checkout (EU/UK regions only).","Las modificaciones inadecuadas pueden interrumpir la integración. Solo debes cambiar este valor si es necesario.
Se dirigirá a tus clientes a esta URL cuando hagan clic en “Cancelar pago de Amazon Pay y volver a [nombre del vendedor]” durante el proceso de pago. De forma predeterminada, tus clientes volverán a la página previa al pago."
"Amazon Sign In cancel URL Path","Ruta de URL de cancelación de inicio de sesión de Amazon (solo regiones de Reino Unido/UE)"
"Amazon Pay Sign In could potentially break if this value is modified. Do it only if it is needed by your website.
Amazon Pay will redirect to this URL if the customer clicks ""Cancel"" from the Amazon-hosted page. Do not use a leading slash. Leave blank to return the customer to the last page visited before sign in (EU/UK regions only).","Las modificaciones inadecuadas pueden interrumpir la integración. Solo debes cambiar este valor si es necesario.
Se redirigirá a tus clientes a esta URL cuando hagan clic en “Cancelar” en la página de Iniciar sesión con Amazon. No incluyas una barra diagonal al principio. De forma predeterminada, los clientes volverán a la página anterior."
+"Amazon Pay will not be functional until the legacy keys associated with your configuration are updated. Click the button below to upgrade your credentials.","Amazon Pay no funcionará hasta que se actualicen las claves heredadas asociadas con su configuración. Haga clic en el botón de abajo para actualizar sus credenciales."
+"Upgrade your legacy Amazon Pay credentials","Actualice sus credenciales heredadas de Amazon Pay"
+"Updating your config with new keys, please wait...","Actualizando su configuración con claves nuevas, por favor espere..."
diff --git a/i18n/es_VE.csv b/i18n/es_VE.csv
index bfd8c6756..d715d6001 100644
--- a/i18n/es_VE.csv
+++ b/i18n/es_VE.csv
@@ -198,3 +198,6 @@ Nota: El botón de Amazon Pay solo podrán verlo los clientes con las direccione
"Amazon Pay Checkout could potentially break if this value is modified. Do it only if it is needed by your website.
Amazon Pay will redirect to this URL if the customer clicks ""Cancel Amazon Pay checkout and return to [merchant site]"" from the Amazon-hosted page. Do not use a leading slash. Leave blank to return the customer to the last page visited before checkout (EU/UK regions only).","Las modificaciones inadecuadas pueden interrumpir la integración. Solo debes cambiar este valor si es necesario.
Se dirigirá a tus clientes a esta URL cuando hagan clic en “Cancelar pago de Amazon Pay y volver a [nombre del vendedor]” durante el proceso de pago. De forma predeterminada, tus clientes volverán a la página previa al pago."
"Amazon Sign In cancel URL Path","Ruta de URL de cancelación de inicio de sesión de Amazon (solo regiones de Reino Unido/UE)"
"Amazon Pay Sign In could potentially break if this value is modified. Do it only if it is needed by your website.
Amazon Pay will redirect to this URL if the customer clicks ""Cancel"" from the Amazon-hosted page. Do not use a leading slash. Leave blank to return the customer to the last page visited before sign in (EU/UK regions only).","Las modificaciones inadecuadas pueden interrumpir la integración. Solo debes cambiar este valor si es necesario.
Se redirigirá a tus clientes a esta URL cuando hagan clic en “Cancelar” en la página de Iniciar sesión con Amazon. No incluyas una barra diagonal al principio. De forma predeterminada, los clientes volverán a la página anterior."
+"Amazon Pay will not be functional until the legacy keys associated with your configuration are updated. Click the button below to upgrade your credentials.","Amazon Pay no funcionará hasta que se actualicen las claves heredadas asociadas con su configuración. Haga clic en el botón de abajo para actualizar sus credenciales."
+"Upgrade your legacy Amazon Pay credentials","Actualice sus credenciales heredadas de Amazon Pay"
+"Updating your config with new keys, please wait...","Actualizando su configuración con claves nuevas, por favor espere..."
diff --git a/i18n/fr_CA.csv b/i18n/fr_CA.csv
index 768ac7599..23adf8d79 100644
--- a/i18n/fr_CA.csv
+++ b/i18n/fr_CA.csv
@@ -195,3 +195,6 @@
"Amazon Pay Checkout could potentially break if this value is modified. Do it only if it is needed by your website.
Amazon Pay will redirect to this URL if the customer clicks ""Cancel Amazon Pay checkout and return to [merchant site]"" from the Amazon-hosted page. Do not use a leading slash. Leave blank to return the customer to the last page visited before checkout (EU/UK regions only).","Des modifications incorrectes peuvent casser l'intégration. Modifiez cette valeur uniquement si nécessaire.
Vos clients seront redirigés vers cette URL lorsqu'ils cliqueront sur « Annuler le paiement Amazon Pay et retourner à [nom du marchand] » lors du paiement. Par défaut, vos clients seront renvoyés vers votre page de pré-paiement."
"Amazon Sign In cancel URL Path","Chemin de l'URL d'annulation de connexion Amazon (régions UE/Royaume-Uni uniquement)"
"Amazon Pay Sign In could potentially break if this value is modified. Do it only if it is needed by your website.
Amazon Pay will redirect to this URL if the customer clicks ""Cancel"" from the Amazon-hosted page. Do not use a leading slash. Leave blank to return the customer to the last page visited before sign in (EU/UK regions only).","Des modifications incorrectes peuvent casser l'intégration. Modifiez cette valeur uniquement si nécessaire.
Vos clients seront redirigés vers cette URL lorsqu'ils cliqueront sur « Annuler » sur la page Se connecter avec Amazon. N'entrez pas de barre oblique. Par défaut, vos clients seront renvoyés à la page précédente."
+"Amazon Pay will not be functional until the legacy keys associated with your configuration are updated. Click the button below to upgrade your credentials.","Amazon Pay ne sera pas fonctionnel tant que les anciennes clés associées à votre configuration ne seront pas mises à jour. Cliquez sur le bouton ci-dessous pour mettre à jour vos informations d'identification."
+"Upgrade your legacy Amazon Pay credentials","Mettez à niveau vos anciennes informations d'identification Amazon Pay"
+"Updating your config with new keys, please wait...","Mise à jour de votre configuration avec de nouvelles clés, veuillez patienter..."
diff --git a/i18n/fr_FR.csv b/i18n/fr_FR.csv
index 768ac7599..23adf8d79 100644
--- a/i18n/fr_FR.csv
+++ b/i18n/fr_FR.csv
@@ -195,3 +195,6 @@
"Amazon Pay Checkout could potentially break if this value is modified. Do it only if it is needed by your website.
Amazon Pay will redirect to this URL if the customer clicks ""Cancel Amazon Pay checkout and return to [merchant site]"" from the Amazon-hosted page. Do not use a leading slash. Leave blank to return the customer to the last page visited before checkout (EU/UK regions only).","Des modifications incorrectes peuvent casser l'intégration. Modifiez cette valeur uniquement si nécessaire.
Vos clients seront redirigés vers cette URL lorsqu'ils cliqueront sur « Annuler le paiement Amazon Pay et retourner à [nom du marchand] » lors du paiement. Par défaut, vos clients seront renvoyés vers votre page de pré-paiement."
"Amazon Sign In cancel URL Path","Chemin de l'URL d'annulation de connexion Amazon (régions UE/Royaume-Uni uniquement)"
"Amazon Pay Sign In could potentially break if this value is modified. Do it only if it is needed by your website.
Amazon Pay will redirect to this URL if the customer clicks ""Cancel"" from the Amazon-hosted page. Do not use a leading slash. Leave blank to return the customer to the last page visited before sign in (EU/UK regions only).","Des modifications incorrectes peuvent casser l'intégration. Modifiez cette valeur uniquement si nécessaire.
Vos clients seront redirigés vers cette URL lorsqu'ils cliqueront sur « Annuler » sur la page Se connecter avec Amazon. N'entrez pas de barre oblique. Par défaut, vos clients seront renvoyés à la page précédente."
+"Amazon Pay will not be functional until the legacy keys associated with your configuration are updated. Click the button below to upgrade your credentials.","Amazon Pay ne sera pas fonctionnel tant que les anciennes clés associées à votre configuration ne seront pas mises à jour. Cliquez sur le bouton ci-dessous pour mettre à jour vos informations d'identification."
+"Upgrade your legacy Amazon Pay credentials","Mettez à niveau vos anciennes informations d'identification Amazon Pay"
+"Updating your config with new keys, please wait...","Mise à jour de votre configuration avec de nouvelles clés, veuillez patienter..."
diff --git a/i18n/it_CH.csv b/i18n/it_CH.csv
index 5f9048952..9ebc3a9e1 100644
--- a/i18n/it_CH.csv
+++ b/i18n/it_CH.csv
@@ -194,3 +194,6 @@
"Amazon Pay Checkout could potentially break if this value is modified. Do it only if it is needed by your website.
Amazon Pay will redirect to this URL if the customer clicks ""Cancel Amazon Pay checkout and return to [merchant site]"" from the Amazon-hosted page. Do not use a leading slash. Leave blank to return the customer to the last page visited before checkout (EU/UK regions only).","Le modifiche improprie possono danneggiare l'integrazione. Modifica questo valore solo se necessario.
I tuoi clienti verranno indirizzati a questo URL quando cliccheranno su “Annulla il checkout di Amazon Pay e torna a [nome venditore]” durante il pagamento. Per impostazione predefinita, i clienti verranno reindirizzati alla pagina di pre-pagamento."
"Amazon Sign In cancel URL Path","Percorso URL di annullamento accesso ad Amazon (solo UE/Regno Unito)"
"Amazon Pay Sign In could potentially break if this value is modified. Do it only if it is needed by your website.
Amazon Pay will redirect to this URL if the customer clicks ""Cancel"" from the Amazon-hosted page. Do not use a leading slash. Leave blank to return the customer to the last page visited before sign in (EU/UK regions only).","Le modifiche improprie possono danneggiare l'integrazione. Modifica questo valore solo se necessario.
I tuoi clienti verranno reindirizzati a questo URL quando cliccheranno su “Annulla” nella pagina Accedi con Amazon. Non inserire una barra iniziale. Per impostazione predefinita, i clienti verranno reindirizzati alla pagina precedente."
+"Amazon Pay will not be functional until the legacy keys associated with your configuration are updated. Click the button below to upgrade your credentials.","Amazon Pay non funzionerà fino a quando le chiavi legacy associate alla tua configurazione non saranno aggiornate. Fai clic sul pulsante in basso per aggiornare le tue credenziali."
+"Upgrade your legacy Amazon Pay credentials","Aggiorna le tue credenziali Amazon Pay legacy"
+"Updating your config with new keys, please wait...","Aggiornamento della configurazione con nuove chiavi, attendere..."
diff --git a/i18n/it_IT.csv b/i18n/it_IT.csv
index 5f9048952..9ebc3a9e1 100644
--- a/i18n/it_IT.csv
+++ b/i18n/it_IT.csv
@@ -194,3 +194,6 @@
"Amazon Pay Checkout could potentially break if this value is modified. Do it only if it is needed by your website.
Amazon Pay will redirect to this URL if the customer clicks ""Cancel Amazon Pay checkout and return to [merchant site]"" from the Amazon-hosted page. Do not use a leading slash. Leave blank to return the customer to the last page visited before checkout (EU/UK regions only).","Le modifiche improprie possono danneggiare l'integrazione. Modifica questo valore solo se necessario.
I tuoi clienti verranno indirizzati a questo URL quando cliccheranno su “Annulla il checkout di Amazon Pay e torna a [nome venditore]” durante il pagamento. Per impostazione predefinita, i clienti verranno reindirizzati alla pagina di pre-pagamento."
"Amazon Sign In cancel URL Path","Percorso URL di annullamento accesso ad Amazon (solo UE/Regno Unito)"
"Amazon Pay Sign In could potentially break if this value is modified. Do it only if it is needed by your website.
Amazon Pay will redirect to this URL if the customer clicks ""Cancel"" from the Amazon-hosted page. Do not use a leading slash. Leave blank to return the customer to the last page visited before sign in (EU/UK regions only).","Le modifiche improprie possono danneggiare l'integrazione. Modifica questo valore solo se necessario.
I tuoi clienti verranno reindirizzati a questo URL quando cliccheranno su “Annulla” nella pagina Accedi con Amazon. Non inserire una barra iniziale. Per impostazione predefinita, i clienti verranno reindirizzati alla pagina precedente."
+"Amazon Pay will not be functional until the legacy keys associated with your configuration are updated. Click the button below to upgrade your credentials.","Amazon Pay non funzionerà fino a quando le chiavi legacy associate alla tua configurazione non saranno aggiornate. Fai clic sul pulsante in basso per aggiornare le tue credenziali."
+"Upgrade your legacy Amazon Pay credentials","Aggiorna le tue credenziali Amazon Pay legacy"
+"Updating your config with new keys, please wait...","Aggiornamento della configurazione con nuove chiavi, attendere..."
diff --git a/view/adminhtml/templates/system/config/autokeyexchange_admin.phtml b/view/adminhtml/templates/system/config/autokeyexchange_admin.phtml
index b5a73e8ef..cbdb2f504 100644
--- a/view/adminhtml/templates/system/config/autokeyexchange_admin.phtml
+++ b/view/adminhtml/templates/system/config/autokeyexchange_admin.phtml
@@ -20,70 +20,95 @@ $currency = $block->getCurrency();
-
-
- = $block->escapeHtml(__("In order to enable automatic account configuration using Amazon's secure key " . - 'exchange, please turn on secure admin pages in General > Web > Use secure URLs in Admin.')); ?> -
-- = $block->escapeHtml(__('Updating your config with new keys, please wait...')); ?> -
-+ = $block->escapeHtml(__("In order to enable automatic account configuration using Amazon's secure " . + 'key exchange, please turn on secure admin pages in General > Web > Use secure URLs in Admin.')); ?> +
++ = $block->escapeHtml(__('Updating your config with new keys, please wait...')); ?> +
+