author
int64
658
755k
date
stringlengths
19
19
timezone
int64
-46,800
43.2k
hash
stringlengths
40
40
message
stringlengths
5
490
mods
list
language
stringclasses
20 values
license
stringclasses
3 values
repo
stringlengths
5
68
original_message
stringlengths
12
491
21,270
19.11.2020 15:10:01
28,800
80b9c0becba6b1ae6fc92532a5a4897e19443e07
adds de addresses to csp
[ { "change_type": "MODIFY", "old_path": "src/PayV2/etc/csp_whitelist.xml", "new_path": "src/PayV2/etc/csp_whitelist.xml", "diff": "<value id=\"amazon_it\" type=\"host\">*.amazon.it</value>\n<value id=\"amazon_fr\" type=\"host\">*.amazon.fr</value>\n<value id=\"amazon_es\" type=\"host\">*.amazon.es</value>\n+ <value id=\"amazon_de\" type=\"host\">*.amazon.de</value>\n<value id=\"amazonpay_com\" type=\"host\">*.amazonpay.com</value>\n<value id=\"amazonpay_co_uk\" type=\"host\">*.amazonpay.co.uk</value>\n<value id=\"amazonpay_co_jp\" type=\"host\">*.amazonpay.co.jp</value>\n<value id=\"amazonpay_it\" type=\"host\">*.amazonpay.it</value>\n<value id=\"amazonpay_fr\" type=\"host\">*.amazonpay.fr</value>\n<value id=\"amazonpay_es\" type=\"host\">*.amazonpay.es</value>\n+ <value id=\"amazonpay_de\" type=\"host\">*.amazonpay.de</value>\n<value id=\"amazonservices_com\" type=\"host\">mws.amazonservices.com</value>\n<value id=\"amazonservices_co_uk\" type=\"host\">mws.amazonservices.co.uk</value>\n<value id=\"amazonservices_co_jp\" type=\"host\">mws.amazonservices.co.jp</value>\n<value id=\"amazonservices_it\" type=\"host\">mws.amazonservices.it</value>\n<value id=\"amazonservices_fr\" type=\"host\">mws.amazonservices.fr</value>\n<value id=\"amazonservices_es\" type=\"host\">mws.amazonservices.es</value>\n+ <value id=\"amazonservices_de\" type=\"host\">mws.amazonservices.de</value>\n</values>\n</policy>\n<policy id=\"script-src\">\n<value id=\"amazon_payment_widget_it\" type=\"host\">*.payments-amazon.it</value>\n<value id=\"amazon_payment_widget_fr\" type=\"host\">*.payments-amazon.fr</value>\n<value id=\"amazon_payment_widget_es\" type=\"host\">*.payments-amazon.es</value>\n+ <value id=\"amazon_payment_widget_de\" type=\"host\">*.payments-amazon.de</value>\n</values>\n</policy>\n<policy id=\"img-src\">\n<value id=\"ssl_images_amazon_it\" type=\"host\">*.ssl-images-amazon.it</value>\n<value id=\"ssl_images_amazon_fr\" type=\"host\">*.ssl-images-amazon.fr</value>\n<value id=\"ssl_images_amazon_es\" type=\"host\">*.ssl-images-amazon.es</value>\n+ <value id=\"ssl_images_amazon_de\" type=\"host\">*.ssl-images-amazon.de</value>\n<value id=\"media_amazon_com\" type=\"host\">*.media-amazon.com</value>\n<value id=\"media_amazon_co_uk\" type=\"host\">*.media-amazon.co.uk</value>\n<value id=\"media_amazon_co_jp\" type=\"host\">*.media-amazon.co.jp</value>\n<value id=\"media_amazon_it\" type=\"host\">*.media-amazon.it</value>\n<value id=\"media_amazon_fr\" type=\"host\">*.media-amazon.fr</value>\n<value id=\"media_amazon_es\" type=\"host\">*.media-amazon.es</value>\n+ <value id=\"media_amazon_de\" type=\"host\">*.media-amazon.de</value>\n</values>\n</policy>\n<policy id=\"form-action\">\n<value id=\"amazon_it\" type=\"host\">*.amazon.it</value>\n<value id=\"amazon_fr\" type=\"host\">*.amazon.fr</value>\n<value id=\"amazon_es\" type=\"host\">*.amazon.es</value>\n+ <value id=\"amazon_de\" type=\"host\">*.amazon.de</value>\n</values>\n</policy>\n<policy id=\"frame-src\">\n<value id=\"amazon_it\" type=\"host\">*.amazon.it</value>\n<value id=\"amazon_fr\" type=\"host\">*.amazon.fr</value>\n<value id=\"amazon_es\" type=\"host\">*.amazon.es</value>\n+ <value id=\"amazon_de\" type=\"host\">*.amazon.de</value>\n<value id=\"amazon_payment_widget_com\" type=\"host\">*.payments-amazon.com</value>\n<value id=\"amazon_payment_widget_co_uk\" type=\"host\">*.payments-amazon.co.uk</value>\n<value id=\"amazon_payment_widget_co_jp\" type=\"host\">*.payments-amazon.co.jp</value>\n<value id=\"amazon_payment_widget_it\" type=\"host\">*.payments-amazon.it</value>\n<value id=\"amazon_payment_widget_fr\" type=\"host\">*.payments-amazon.fr</value>\n<value id=\"amazon_payment_widget_es\" type=\"host\">*.payments-amazon.es</value>\n+ <value id=\"amazon_payment_widget_de\" type=\"host\">*.payments-amazon.de</value>\n</values>\n</policy>\n</policies>\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
ASD-559 adds de addresses to csp
21,270
24.11.2020 13:28:15
28,800
fb1dd6a8e768b8763113f7821328c6638422c25c
fixes cancel and void admin buttons
[ { "change_type": "MODIFY", "old_path": "src/PayV2/Plugin/OrderCurrencyComment.php", "new_path": "src/PayV2/Plugin/OrderCurrencyComment.php", "diff": "@@ -63,12 +63,12 @@ class OrderCurrencyComment\n{\nif ($subject->getMethod() == Config::CODE) {\n$order = $subject->getOrder();\n- if (($order->getBaseCurrencyCode() != $order->getOrderCurrencyCode()\n- && $subject->getMessage() instanceof Phrase\n+ if ($order->getBaseCurrencyCode() != $order->getOrderCurrencyCode() &&\n+ (($subject->getMessage() instanceof Phrase\n&& $subject->getMessage()->getText() == 'Canceled order online')\n- || strpos($subject->getTransactionId(), '-void') !== FALSE\n+ || strpos($subject->getTransactionId(), '-void') !== FALSE)\n) {\n- return $result .' ['. $order->formatPriceTxt($subject->getCreditmemo()->getGrandTotal()) .']';\n+ return $result .' ['. $order->formatPriceTxt($subject->getAmountOrdered()) .']';\n}\n}\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
ASD-565 fixes cancel and void admin buttons
21,241
02.10.2020 11:45:12
18,000
31e151e3e6131db93a7ca2aaf2f8413a14b71b27
WIP - handle async responses, queuing properly
[ { "change_type": "MODIFY", "old_path": "src/PayV2/Model/AsyncManagement/Charge.php", "new_path": "src/PayV2/Model/AsyncManagement/Charge.php", "diff": "namespace Amazon\\PayV2\\Model\\AsyncManagement;\n+use Amazon\\PayV2\\Model\\Config\\Source\\PaymentAction;\nuse Magento\\Sales\\Api\\Data\\TransactionInterface as Transaction;\nuse Magento\\Sales\\Api\\Data\\InvoiceInterface;\nuse Magento\\Sales\\Api\\Data\\OrderInterface;\n@@ -57,17 +58,24 @@ class Charge extends AbstractOperation\n*/\nprivate $urlBuilder;\n+ /**\n+ * @var \\Amazon\\PayV2\\Model\\AmazonConfig\n+ */\n+ private $amazonConfig;\n+\n/**\n* Charge constructor.\n* @param \\Magento\\Framework\\Api\\SearchCriteriaBuilder $searchCriteriaBuilder\n* @param \\Magento\\Sales\\Api\\OrderRepositoryInterface $orderRepository\n* @param \\Magento\\Sales\\Api\\TransactionRepositoryInterface $transactionRepository\n* @param \\Amazon\\PayV2\\Model\\Adapter\\AmazonPayV2Adapter $amazonAdapter\n+ * @param \\Amazon\\PayV2\\Logger\\AsyncIpnLogger $asyncLogger\n* @param \\Magento\\Sales\\Api\\InvoiceRepositoryInterface $invoiceRepository\n* @param \\Magento\\Sales\\Model\\Service\\InvoiceService $invoiceService\n* @param \\Magento\\Sales\\Model\\Order\\Payment\\Transaction\\BuilderInterface $transactionBuilder\n* @param \\Magento\\Framework\\Notification\\NotifierInterface $notifier\n* @param \\Magento\\Backend\\Model\\UrlInterface $urlBuilder\n+ * @param \\Amazon\\PayV2\\Model\\AmazonConfig $amazonConfig\n*/\npublic function __construct(\n\\Magento\\Framework\\Api\\SearchCriteriaBuilder $searchCriteriaBuilder,\n@@ -79,7 +87,8 @@ class Charge extends AbstractOperation\n\\Magento\\Sales\\Model\\Service\\InvoiceService $invoiceService,\n\\Magento\\Sales\\Model\\Order\\Payment\\Transaction\\BuilderInterface $transactionBuilder,\n\\Magento\\Framework\\Notification\\NotifierInterface $notifier,\n- \\Magento\\Backend\\Model\\UrlInterface $urlBuilder\n+ \\Magento\\Backend\\Model\\UrlInterface $urlBuilder,\n+ \\Amazon\\PayV2\\Model\\AmazonConfig $amazonConfig\n) {\nparent::__construct($orderRepository, $transactionRepository, $searchCriteriaBuilder);\n$this->amazonAdapter = $amazonAdapter;\n@@ -89,6 +98,7 @@ class Charge extends AbstractOperation\n$this->transactionBuilder = $transactionBuilder;\n$this->notifier = $notifier;\n$this->urlBuilder = $urlBuilder;\n+ $this->amazonConfig = $amazonConfig;\n}\n/**\n@@ -120,7 +130,13 @@ class Charge extends AbstractOperation\n// Compare Charge State with Order State\nif (isset($charge['statusDetails'])) {\n- switch ($charge['statusDetails']['state']) {\n+ $state = $charge['statusDetails']['state'];\n+ if ($this->amazonConfig->getPaymentAction() == PaymentAction::AUTHORIZE_AND_CAPTURE && $state == 'Authorized') {\n+ $this->amazonAdapter->captureCharge($order->getStoreId(), $chargeId, $order->getGrandTotal(), $order->getOrderCurrencyCode());\n+ $charge = $this->amazonAdapter->getCharge($order->getStoreId(), $chargeId);\n+ $state = $charge['statusDetails']['state'];\n+ }\n+ switch ($state) {\ncase 'Declined':\n$this->decline($order, $chargeId, $charge['statusDetails']['reasonDescription']);\nbreak;\n" }, { "change_type": "MODIFY", "old_path": "src/PayV2/Model/CheckoutSessionManagement.php", "new_path": "src/PayV2/Model/CheckoutSessionManagement.php", "diff": "@@ -528,12 +528,13 @@ class CheckoutSessionManagement implements \\Amazon\\PayV2\\Api\\CheckoutSessionMana\n$result = $this->cartManagement->placeOrder($cart->getId());\n$order = $this->orderRepository->get($result);\n$amazonResult = $this->amazonAdapter->completeCheckoutSession($cart->getStoreId(), $checkoutSession->getSessionId(), $cart->getGrandTotal() , $cart->getQuoteCurrencyCode());\n- if (array_key_exists('status', $amazonResult) && $amazonResult['status'] != 200) {\n+ $completeCheckoutStatus = $amazonResult['status'] ?? '404';\n+ if (!preg_match('/^2\\d\\d$/', $completeCheckoutStatus)){\n// Something went wrong, but the order has already been placed\nreturn $result;\n}\n$chargeId = $amazonResult['chargeId'];\n- if ($this->amazonConfig->getPaymentAction() == PaymentAction::AUTHORIZE_AND_CAPTURE) {\n+ if ($completeCheckoutStatus != '202' && $this->amazonConfig->getPaymentAction() == PaymentAction::AUTHORIZE_AND_CAPTURE) {\n$this->amazonAdapter->captureCharge($cart->getStoreId(), $chargeId, $cart->getGrandTotal(), $cart->getQuoteCurrencyCode());\n}\n$amazonCharge = $this->amazonAdapter->getCharge($cart->getStoreId(), $chargeId);\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
APF-230 - WIP - handle async responses, queuing properly
21,241
05.10.2020 14:12:52
18,000
2768c3b36f8c8e41072844df77bb9e874d537fc1
WIP - only mark pending async transaction as complete when they have done something
[ { "change_type": "MODIFY", "old_path": "src/PayV2/Model/AsyncUpdater.php", "new_path": "src/PayV2/Model/AsyncUpdater.php", "diff": "@@ -72,18 +72,21 @@ class AsyncUpdater\ntry {\n$async->getResource()->beginTransaction();\n$async->setLockOnLoad(true);\n+ $asyncComplete = false;\nswitch ($async->getPendingAction()) {\ncase AsyncManagement::ACTION_AUTH:\n- $this->chargeFactory->create()->processStateChange($async->getPendingId());\n- $this->completePending($async);\n+ $asyncComplete = $this->chargeFactory->create()->processStateChange($async->getPendingId());\nbreak;\ncase AsyncManagement::ACTION_REFUND:\n- $this->refundFactory->create()->processRefund($async->getPendingId());\n- $this->completePending($async);\n+ $asyncComplete = $this->refundFactory->create()->processRefund($async->getPendingId());\nbreak;\n}\n+ if ($asyncComplete) {\n+ $this->completePending($async);\n+ }\n+\n$async->getResource()->commit();\n} catch (\\Exception $e) {\n$this->logger->error($e);\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
ASD-521 - WIP - only mark pending async transaction as complete when they have done something
21,270
07.10.2020 16:14:36
25,200
1f8517ea2d4a359402818c8d29d4601bca2139a8
keeps pending state if queue auth is not in Authorized state
[ { "change_type": "MODIFY", "old_path": "src/PayV2/Model/AsyncManagement/Charge.php", "new_path": "src/PayV2/Model/AsyncManagement/Charge.php", "diff": "@@ -136,22 +136,35 @@ class Charge extends AbstractOperation\n$charge = $this->amazonAdapter->getCharge($order->getStoreId(), $chargeId);\n$state = $charge['statusDetails']['state'];\n}\n+\n+ $complete = false;\n+\nswitch ($state) {\ncase 'Declined':\n$this->decline($order, $chargeId, $charge['statusDetails']['reasonDescription']);\n+ $complete = true;\nbreak;\ncase 'Canceled':\n$this->cancel($order, $charge['statusDetails']);\n+ $complete = true;\nbreak;\ncase 'Authorized':\n$this->authorize($order, $chargeId);\n+ $complete = true;\nbreak;\ncase 'Captured':\n$this->capture($order, $chargeId, $charge['captureAmount']['amount']);\n+ $complete = true;\n+ break;\n+ default:\nbreak;\n}\n+\n+ return $complete;\n}\n}\n+\n+ return false;\n}\n/**\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
ASD-515 keeps pending state if queue auth is not in Authorized state
21,270
13.10.2020 16:31:47
25,200
e33ad89e7032afd37b818e32cf8dd61e24f08139
hybrid payment action to coordinate AP state and Magento for async charge on order
[ { "change_type": "MODIFY", "old_path": "src/PayV2/Model/AsyncManagement/Charge.php", "new_path": "src/PayV2/Model/AsyncManagement/Charge.php", "diff": "@@ -153,6 +153,7 @@ class Charge extends AbstractOperation\n$complete = true;\nbreak;\ncase 'Captured':\n+ $this->setProcessing($order);\n$this->capture($order, $chargeId, $charge['captureAmount']['amount']);\n$complete = true;\nbreak;\n" }, { "change_type": "ADD", "old_path": null, "new_path": "src/PayV2/Model/Config/Source/AuthorizationMode.php", "diff": "+<?php\n+\n+\n+namespace Amazon\\PayV2\\Model\\Config\\Source;\n+\n+\n+/**\n+ * Class AuthorizationMode\n+ * @package Amazon\\PayV2\\Model\\Config\\Source\n+ */\n+class AuthorizationMode\n+{\n+ const ASYNC = 'asynchronous';\n+ const SYNC = 'synchronous';\n+ const SYNC_THEN_ASYNC = 'synchronous_possible';\n+}\n" }, { "change_type": "ADD", "old_path": null, "new_path": "src/PayV2/Plugin/ModelMethodAdapter.php", "diff": "+<?php\n+\n+\n+namespace Amazon\\PayV2\\Plugin;\n+\n+\n+use Amazon\\PayV2\\Gateway\\Config\\Config;\n+use Amazon\\PayV2\\Model\\Config\\Source\\AuthorizationMode;\n+use Amazon\\PayV2\\Model\\Config\\Source\\PaymentAction;\n+use Magento\\Framework\\App\\Config\\ScopeConfigInterface;\n+\n+/**\n+ * Class ModelMethodAdapter\n+ * @package Amazon\\PayV2\\Plugin\n+ */\n+class ModelMethodAdapter\n+{\n+ /**\n+ * @var ScopeConfigInterface\n+ */\n+ protected $scopeConfig;\n+\n+ /**\n+ * ModelMethodAdapter constructor.\n+ * @param ScopeConfigInterface $scopeConfig\n+ */\n+ public function __construct(\n+ ScopeConfigInterface $scopeConfig\n+ )\n+ {\n+ $this->scopeConfig = $scopeConfig;\n+ }\n+\n+ /**\n+ * @param \\Magento\\Payment\\Model\\Method\\Adapter $subject\n+ * @param $result\n+ * @return string\n+ */\n+ public function afterGetConfigPaymentAction(\\Magento\\Payment\\Model\\Method\\Adapter $subject, $result)\n+ {\n+ if ($subject->getCode() == Config::CODE) {\n+ if ($this->scopeConfig->getValue('payment/amazon_payment/authorization_mode') == AuthorizationMode::SYNC_THEN_ASYNC) {\n+ $result = PaymentAction::AUTHORIZE;\n+ }\n+ }\n+\n+ return $result;\n+ }\n+}\n" }, { "change_type": "MODIFY", "old_path": "src/PayV2/etc/di.xml", "new_path": "src/PayV2/etc/di.xml", "diff": "<argument name=\"customerSession\" xsi:type=\"object\">Magento\\Customer\\Model\\Session\\Proxy</argument>\n</arguments>\n</type>\n+ <type name=\"Magento\\Payment\\Model\\Method\\Adapter\">\n+ <plugin name=\"amazon_payv2_pay_action\" type=\"Amazon\\PayV2\\Plugin\\ModelMethodAdapter\" sortOrder=\"1\" />\n+ </type>\n</config>\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
ASD-527 hybrid payment action to coordinate AP state and Magento for async charge on order
21,270
06.11.2020 16:50:52
28,800
1b6301a77da45c1bff608f085c645d5dbeb70985
calls closeChargePermission on AuthorizationInitiated orders that get a Declined later; other automatic fixes
[ { "change_type": "MODIFY", "old_path": "src/PayV2/Gateway/Response/AuthorizationSaleHandler.php", "new_path": "src/PayV2/Gateway/Response/AuthorizationSaleHandler.php", "diff": "@@ -18,6 +18,8 @@ namespace Amazon\\PayV2\\Gateway\\Response;\nuse Amazon\\PayV2\\Gateway\\Helper\\SubjectReader;\nuse Amazon\\PayV2\\Model\\AsyncManagement;\n+use Amazon\\PayV2\\Model\\Config\\Source\\AuthorizationMode;\n+use Magento\\Framework\\App\\Config\\ScopeConfigInterface;\nuse Magento\\Payment\\Gateway\\Response\\HandlerInterface;\nuse Magento\\Sales\\Model\\Order\\Payment;\n@@ -33,17 +35,25 @@ class AuthorizationSaleHandler implements HandlerInterface\n*/\nprivate $asyncManagement;\n+ /**\n+ * @var ScopeConfigInterface\n+ */\n+ private $scopeConfig;\n+\n/**\n* AuthorizationHandler constructor.\n* @param SubjectReader $subjectReader\n* @param AsyncManagement $asyncManagement\n+ * @param ScopeConfigInterface $scopeConfig\n*/\npublic function __construct(\nSubjectReader $subjectReader,\n- AsyncManagement $asyncManagement\n+ AsyncManagement $asyncManagement,\n+ ScopeConfigInterface $scopeConfig\n) {\n$this->subjectReader = $subjectReader;\n$this->asyncManagement = $asyncManagement;\n+ $this->scopeConfig = $scopeConfig;\n}\n/**\n@@ -64,6 +74,10 @@ class AuthorizationSaleHandler implements HandlerInterface\n$transactionId = $response['chargeId'] ?? $response['checkoutSessionId'];\n$payment->setTransactionId($transactionId);\n$payment->setIsTransactionClosed($handlingSubject['partial_capture'] ?? false);\n+\n+ if ($this->scopeConfig->getValue('payment/amazon_payment/authorization_mode') == AuthorizationMode::SYNC_THEN_ASYNC) {\n+ $payment->setIsTransactionPending(true);\n+ }\n}\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "src/PayV2/Model/AmazonConfig.php", "new_path": "src/PayV2/Model/AmazonConfig.php", "diff": "@@ -435,6 +435,20 @@ class AmazonConfig\n);\n}\n+ /**\n+ * @param string $scope\n+ * @param null $scopeCode\n+ * @return mixed\n+ */\n+ public function getAuthorizationMode($scope = ScopeInterface::SCOPE_STORE, $scopeCode = null)\n+ {\n+ return $this->scopeConfig->getValue(\n+ 'payment/amazon_payment/authorization_mode',\n+ $scope,\n+ $scopeCode\n+ );\n+ }\n+\n/**\n* @return bool\n*/\n" }, { "change_type": "MODIFY", "old_path": "src/PayV2/Model/AsyncManagement/Charge.php", "new_path": "src/PayV2/Model/AsyncManagement/Charge.php", "diff": "@@ -108,7 +108,7 @@ class Charge extends AbstractOperation\n*/\nprotected function loadInvoice($chargeId, OrderInterface $order)\n{\n- $this->searchCriteriaBuilder->addFilter(InvoiceInterface::TRANSACTION_ID, $chargeId . '-capture');\n+ $this->searchCriteriaBuilder->addFilter(InvoiceInterface::TRANSACTION_ID, $chargeId . '%', 'like');\n$this->searchCriteriaBuilder->addFilter(InvoiceInterface::ORDER_ID, $order->getEntityId());\n$this->searchCriteriaBuilder->setPageSize(1);\n$this->searchCriteriaBuilder->setCurrentPage(1);\n@@ -141,10 +141,11 @@ class Charge extends AbstractOperation\nswitch ($state) {\ncase 'Declined':\n- $this->decline($order, $chargeId, $charge['statusDetails']['reasonDescription']);\n+ $this->decline($order, $chargeId, $charge['statusDetails']);\n$complete = true;\nbreak;\ncase 'Canceled':\n+ $this->setProcessing($order);\n$this->cancel($order, $charge['statusDetails']);\n$complete = true;\nbreak;\n@@ -175,7 +176,7 @@ class Charge extends AbstractOperation\n* @param string $chargeId\n* @param string $reason\n*/\n- public function decline($order, $chargeId, $reason)\n+ public function decline($order, $chargeId, $detail)\n{\n$invoice = $this->loadInvoice($chargeId, $order);\nif ($invoice) {\n@@ -183,9 +184,16 @@ class Charge extends AbstractOperation\n$order->addRelatedObject($invoice);\n}\nif ($order->canHold() || $order->isPaymentReview()) {\n- $this->setOnHold($order);\n$this->closeLastTransaction($order);\n- $order->addStatusHistoryComment($reason);\n+ $this->amazonAdapter->closeChargePermission($order->getStoreId(), $order->getPayment()->getAdditionalInformation()['charge_permission_id'], 'Canceled due to capture declined.', true);\n+ $this->setOrderState($order, 'canceled');\n+ $payment = $order->getPayment();\n+ $transaction = $this->transactionBuilder->setPayment($payment)\n+ ->setOrder($order)\n+ ->setTransactionId($chargeId)\n+ ->setFailSafe(true)\n+ ->build(Transaction::TYPE_AUTH);\n+ $payment->addTransactionCommentsToOrder($transaction, __('Capture declined') . '.');\n$order->save();\n$this->notifier->addNotice(\n@@ -247,7 +255,7 @@ class Charge extends AbstractOperation\n/**\n* Capture charge\n*\n- * @param \\Magento\\Sales\\Model\\Order $order\n+ * @param \\Magento\\Sales\\Model\\Order|\\Magento\\Sales\\Api\\Data\\OrderInterface $order\n* @param string $chargeId\n* @param float $chargeAmount\n*/\n" }, { "change_type": "MODIFY", "old_path": "src/PayV2/Model/AsyncManagement/Refund.php", "new_path": "src/PayV2/Model/AsyncManagement/Refund.php", "diff": "@@ -104,6 +104,8 @@ class Refund extends AbstractOperation\n);\n$this->asyncLogger->info('Refund declined for Order #' . $order->getIncrementId());\n+\n+ return true;\n}\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "src/PayV2/Model/CheckoutSessionManagement.php", "new_path": "src/PayV2/Model/CheckoutSessionManagement.php", "diff": "namespace Amazon\\PayV2\\Model;\nuse Amazon\\PayV2\\Api\\Data\\CheckoutSessionInterface;\n+use Amazon\\PayV2\\Model\\Config\\Source\\AuthorizationMode;\nuse Amazon\\PayV2\\Model\\Config\\Source\\PaymentAction;\nuse Amazon\\PayV2\\Model\\AsyncManagement;\nuse http\\Exception\\UnexpectedValueException;\n@@ -119,6 +120,11 @@ class CheckoutSessionManagement implements \\Amazon\\PayV2\\Api\\CheckoutSessionMana\n*/\nprivate $asyncManagement;\n+ /**\n+ * @var AsyncManagement\\Charge\n+ */\n+ private $asyncCharge;\n+\n/**\n* @var array\n*/\n@@ -147,6 +153,7 @@ class CheckoutSessionManagement implements \\Amazon\\PayV2\\Api\\CheckoutSessionMana\n* @param AmazonConfig $amazonConfig\n* @param Adapter\\AmazonPayV2Adapter $amazonAdapter\n* @param AsyncManagement $asyncManagement\n+ * @param \\Amazon\\PayV2\\Model\\AsyncManagement\\Charge $asyncCharge\n* @param \\Magento\\Sales\\Api\\TransactionRepositoryInterface $transactionRepository\n* @param \\Magento\\Framework\\Api\\SearchCriteriaBuilder $searchCriteriaBuilder\n*/\n@@ -167,6 +174,7 @@ class CheckoutSessionManagement implements \\Amazon\\PayV2\\Api\\CheckoutSessionMana\n\\Amazon\\PayV2\\Model\\AmazonConfig $amazonConfig,\n\\Amazon\\PayV2\\Model\\Adapter\\AmazonPayV2Adapter $amazonAdapter,\n\\Amazon\\PayV2\\Model\\AsyncManagement $asyncManagement,\n+ \\Amazon\\PayV2\\Model\\AsyncManagement\\Charge $asyncCharge,\n\\Magento\\Sales\\Api\\TransactionRepositoryInterface $transactionRepository,\n\\Magento\\Framework\\Api\\SearchCriteriaBuilder $searchCriteriaBuilder\n)\n@@ -187,6 +195,7 @@ class CheckoutSessionManagement implements \\Amazon\\PayV2\\Api\\CheckoutSessionMana\n$this->amazonConfig = $amazonConfig;\n$this->amazonAdapter = $amazonAdapter;\n$this->asyncManagement = $asyncManagement;\n+ $this->asyncCharge = $asyncCharge;\n$this->transactionRepository = $transactionRepository;\n$this->searchCriteriaBuilder = $searchCriteriaBuilder;\n}\n@@ -503,6 +512,46 @@ class CheckoutSessionManagement implements \\Amazon\\PayV2\\Api\\CheckoutSessionMana\n$this->orderRepository->save($order);\n}\n+ /**\n+ * Set order as processing\n+ *\n+ * @param Payment $payment\n+ */\n+ protected function setProcessing($payment)\n+ {\n+ $order = $payment->getOrder();\n+ $payment->setIsTransactionPending(false);\n+ $order->getInvoiceCollection()->getFirstItem()->pay();\n+ $order->setState(\\Magento\\Sales\\Model\\Order::STATE_PROCESSING)->setStatus(\n+ \\Magento\\Sales\\Model\\Order::STATE_PROCESSING\n+ );\n+ $this->orderRepository->save($order);\n+ }\n+\n+ /**\n+ * Add capture comment to order\n+ *\n+ * @param Payment $payment\n+ * @param $cart\n+ * @param $chargeId\n+ */\n+ protected function addCaptureComment($payment, $cart, $chargeId)\n+ {\n+ $order = $payment->getOrder();\n+ $formattedAmount = $order->getBaseCurrency()->formatTxt($cart->getBaseGrandTotal());\n+ if ($order->getBaseCurrencyCode() != $order->getOrderCurrencyCode()) {\n+ $formattedAmount = $formattedAmount .' ['. $order->formatPriceTxt($payment->getAmountOrdered()) .']';\n+ }\n+ if ($this->amazonConfig->getPaymentAction() == PaymentAction::AUTHORIZE_AND_CAPTURE) {\n+ $message = __('Captured amount of %1 online.', $formattedAmount);\n+ }\n+ else {\n+ $message = __('Authorized amount of %1.', $formattedAmount);\n+ }\n+ $payment->addTransactionCommentsToOrder($chargeId, $message);\n+ $this->orderRepository->save($order);\n+ }\n+\n/**\n* {@inheritdoc}\n*/\n@@ -529,7 +578,10 @@ class CheckoutSessionManagement implements \\Amazon\\PayV2\\Api\\CheckoutSessionMana\n}\n$chargeId = $amazonResult['chargeId'];\nif ($completeCheckoutStatus != '202' && $this->amazonConfig->getPaymentAction() == PaymentAction::AUTHORIZE_AND_CAPTURE) {\n+ // capture on Amazon Pay\n$this->amazonAdapter->captureCharge($cart->getStoreId(), $chargeId, $cart->getGrandTotal(), $cart->getQuoteCurrencyCode());\n+ // capture and invoice on the Magento side\n+ $this->asyncCharge->capture($order, $chargeId, $cart->getGrandTotal());\n}\n$amazonCharge = $this->amazonAdapter->getCharge($cart->getStoreId(), $chargeId);\n$payment = $order->getPayment();\n@@ -547,6 +599,12 @@ class CheckoutSessionManagement implements \\Amazon\\PayV2\\Api\\CheckoutSessionMana\ncase 'Captured':\n$payment->setIsTransactionClosed(true);\n$transaction->setIsClosed(true);\n+\n+ if ($this->amazonConfig->getAuthorizationMode() == AuthorizationMode::SYNC_THEN_ASYNC) {\n+ $this->setProcessing($payment);\n+ $this->addCaptureComment($payment, $cart, $chargeId);\n+ }\n+\nbreak;\n}\n" }, { "change_type": "DELETE", "old_path": "src/PayV2/Plugin/ModelMethodAdapter.php", "new_path": null, "diff": "-<?php\n-\n-\n-namespace Amazon\\PayV2\\Plugin;\n-\n-\n-use Amazon\\PayV2\\Gateway\\Config\\Config;\n-use Amazon\\PayV2\\Model\\Config\\Source\\AuthorizationMode;\n-use Amazon\\PayV2\\Model\\Config\\Source\\PaymentAction;\n-use Magento\\Framework\\App\\Config\\ScopeConfigInterface;\n-\n-/**\n- * Class ModelMethodAdapter\n- * @package Amazon\\PayV2\\Plugin\n- */\n-class ModelMethodAdapter\n-{\n- /**\n- * @var ScopeConfigInterface\n- */\n- protected $scopeConfig;\n-\n- /**\n- * ModelMethodAdapter constructor.\n- * @param ScopeConfigInterface $scopeConfig\n- */\n- public function __construct(\n- ScopeConfigInterface $scopeConfig\n- )\n- {\n- $this->scopeConfig = $scopeConfig;\n- }\n-\n- /**\n- * @param \\Magento\\Payment\\Model\\Method\\Adapter $subject\n- * @param $result\n- * @return string\n- */\n- public function afterGetConfigPaymentAction(\\Magento\\Payment\\Model\\Method\\Adapter $subject, $result)\n- {\n- if ($subject->getCode() == Config::CODE) {\n- if ($this->scopeConfig->getValue('payment/amazon_payment/authorization_mode') == AuthorizationMode::SYNC_THEN_ASYNC) {\n- $result = PaymentAction::AUTHORIZE;\n- }\n- }\n-\n- return $result;\n- }\n-}\n" }, { "change_type": "MODIFY", "old_path": "src/PayV2/etc/di.xml", "new_path": "src/PayV2/etc/di.xml", "diff": "<argument name=\"customerSession\" xsi:type=\"object\">Magento\\Customer\\Model\\Session\\Proxy</argument>\n</arguments>\n</type>\n- <type name=\"Magento\\Payment\\Model\\Method\\Adapter\">\n- <plugin name=\"amazon_payv2_pay_action\" type=\"Amazon\\PayV2\\Plugin\\ModelMethodAdapter\" sortOrder=\"1\" />\n- </type>\n</config>\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
ASD-515 calls closeChargePermission on AuthorizationInitiated orders that get a Declined later; other automatic fixes
21,270
16.11.2020 16:26:17
28,800
4e1d3e1a6edc0e613f738f06c8a63452379cec47
authorizes order and puts it on processing if AP authorizes during async checkout
[ { "change_type": "MODIFY", "old_path": "src/PayV2/Model/CheckoutSessionManagement.php", "new_path": "src/PayV2/Model/CheckoutSessionManagement.php", "diff": "@@ -521,7 +521,10 @@ class CheckoutSessionManagement implements \\Amazon\\PayV2\\Api\\CheckoutSessionMana\n{\n$order = $payment->getOrder();\n$payment->setIsTransactionPending(false);\n- $order->getInvoiceCollection()->getFirstItem()->pay();\n+ $invoiceCollection = $order->getInvoiceCollection();\n+ if (!empty($invoiceCollection->getItems())) {\n+ $invoiceCollection->getFirstItem()->pay();\n+ }\n$order->setState(\\Magento\\Sales\\Model\\Order::STATE_PROCESSING)->setStatus(\n\\Magento\\Sales\\Model\\Order::STATE_PROCESSING\n);\n@@ -614,6 +617,12 @@ class CheckoutSessionManagement implements \\Amazon\\PayV2\\Api\\CheckoutSessionMana\n$transaction->setIsClosed(false);\n$this->asyncManagement->queuePendingAuthorization($chargeId);\nbreak;\n+ case 'Authorized':\n+ if ($this->amazonConfig->getAuthorizationMode() == AuthorizationMode::SYNC_THEN_ASYNC) {\n+ $this->setProcessing($payment);\n+ $this->addCaptureComment($payment, $cart, $amazonCharge['chargePermissionId']);\n+ }\n+ break;\ncase 'Captured':\n$payment->setIsTransactionClosed(true);\n$transaction->setIsClosed(true);\n@@ -622,7 +631,6 @@ class CheckoutSessionManagement implements \\Amazon\\PayV2\\Api\\CheckoutSessionMana\n$this->setProcessing($payment);\n$this->addCaptureComment($payment, $cart, $chargeId);\n}\n-\nbreak;\n}\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
ASD-515 authorizes order and puts it on processing if AP authorizes during async checkout
21,270
20.11.2020 13:50:06
28,800
8fb2f92bde8e1c09d7778a926c53d8123d9fecc1
handles subsequent invoices on separate invoices
[ { "change_type": "MODIFY", "old_path": "src/PayV2/Gateway/Response/AuthorizationSaleHandler.php", "new_path": "src/PayV2/Gateway/Response/AuthorizationSaleHandler.php", "diff": "@@ -75,9 +75,21 @@ class AuthorizationSaleHandler implements HandlerInterface\n$payment->setTransactionId($transactionId);\n$payment->setIsTransactionClosed($handlingSubject['partial_capture'] ?? false);\n- if ($this->scopeConfig->getValue('payment/amazon_payment/authorization_mode') == AuthorizationMode::SYNC_THEN_ASYNC) {\n+ if ($this->scopeConfig->getValue('payment/amazon_payment/authorization_mode') == AuthorizationMode::SYNC_THEN_ASYNC\n+ && !($handlingSubject['partial_capture'] ?? false)) {\n$payment->setIsTransactionPending(true);\n}\n+\n+ // Subsequent charges on separate shipping will land here. Handle for CaptureInitiated in that case\n+ switch ($response['statusDetails']['state']) {\n+ case 'CaptureInitiated':\n+ $payment->setIsTransactionPending(true);\n+ $payment->setIsTransactionClosed(false);\n+ $this->asyncManagement->queuePendingAuthorization($response['chargeId']);\n+ break;\n+ default:\n+ break;\n+ }\n}\n}\n}\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
ASD-515 handles subsequent invoices on separate invoices
21,270
20.11.2020 16:41:43
28,800
1873f2b4fb72a1f20ca7491808c9d05d1661cb26
changes capture on order + immediate to behave as authorize at first
[ { "change_type": "MODIFY", "old_path": "src/PayV2/Model/CheckoutSessionManagement.php", "new_path": "src/PayV2/Model/CheckoutSessionManagement.php", "diff": "@@ -597,7 +597,13 @@ class CheckoutSessionManagement implements \\Amazon\\PayV2\\Api\\CheckoutSessionMana\n'message' => $amazonResult['message'],\n];\n}\n+\n+ $payment = $order->getPayment();\n$chargeId = $amazonResult['chargeId'];\n+ $transaction = $this->getTransaction($amazonResult['checkoutSessionId']);\n+ $this->updateTransactionId($chargeId, $payment, $transaction);\n+ $payment->setAdditionalInformation('charge_permission_id', $amazonResult['chargePermissionId']);\n+\nif ($completeCheckoutStatus != '202' && $this->amazonConfig->getPaymentAction() == PaymentAction::AUTHORIZE_AND_CAPTURE) {\n// capture on Amazon Pay\n$this->amazonAdapter->captureCharge($cart->getStoreId(), $chargeId, $cart->getGrandTotal(), $cart->getQuoteCurrencyCode());\n@@ -605,9 +611,6 @@ class CheckoutSessionManagement implements \\Amazon\\PayV2\\Api\\CheckoutSessionMana\n$this->asyncCharge->capture($order, $chargeId, $cart->getGrandTotal());\n}\n$amazonCharge = $this->amazonAdapter->getCharge($cart->getStoreId(), $chargeId);\n- $payment = $order->getPayment();\n- $payment->setAdditionalInformation('charge_permission_id', $amazonResult['chargePermissionId']);\n- $transaction = $this->getTransaction($amazonResult['checkoutSessionId']);\n$chargeState = $amazonCharge['statusDetails']['state'];\nswitch ($chargeState) {\n@@ -634,7 +637,6 @@ class CheckoutSessionManagement implements \\Amazon\\PayV2\\Api\\CheckoutSessionMana\nbreak;\n}\n- $this->updateTransactionId($chargeId, $payment, $transaction);\n$checkoutSession->complete();\n$this->checkoutSessionRepository->save($checkoutSession);\n} catch (\\Exception $e) {\n" }, { "change_type": "ADD", "old_path": null, "new_path": "src/PayV2/Plugin/ModelMethodAdapter.php", "diff": "+<?php\n+\n+\n+namespace Amazon\\PayV2\\Plugin;\n+\n+\n+use Amazon\\PayV2\\Gateway\\Config\\Config;\n+use Amazon\\PayV2\\Model\\Config\\Source\\AuthorizationMode;\n+use Amazon\\PayV2\\Model\\Config\\Source\\PaymentAction;\n+use Magento\\Framework\\App\\Config\\ScopeConfigInterface;\n+\n+/**\n+ * Class ModelMethodAdapter\n+ * @package Amazon\\PayV2\\Plugin\n+ */\n+class ModelMethodAdapter\n+{\n+ /**\n+ * @var ScopeConfigInterface\n+ */\n+ protected $scopeConfig;\n+\n+ /**\n+ * ModelMethodAdapter constructor.\n+ * @param ScopeConfigInterface $scopeConfig\n+ */\n+ public function __construct(\n+ ScopeConfigInterface $scopeConfig\n+ )\n+ {\n+ $this->scopeConfig = $scopeConfig;\n+ }\n+\n+ /**\n+ * @param \\Magento\\Payment\\Model\\Method\\Adapter $subject\n+ * @param $result\n+ * @return string\n+ */\n+ public function afterGetConfigPaymentAction(\\Magento\\Payment\\Model\\Method\\Adapter $subject, $result)\n+ {\n+ if ($subject->getCode() == Config::CODE) {\n+ // If Immediate mode, always treat as an authorize for Magento instead of Authorize and Capture\n+ if ($this->scopeConfig->getValue('payment/amazon_payment/authorization_mode') == AuthorizationMode::SYNC) {\n+ $result = PaymentAction::AUTHORIZE;\n+ }\n+ }\n+\n+ return $result;\n+ }\n+}\n" }, { "change_type": "MODIFY", "old_path": "src/PayV2/etc/di.xml", "new_path": "src/PayV2/etc/di.xml", "diff": "<argument name=\"customerSession\" xsi:type=\"object\">Magento\\Customer\\Model\\Session\\Proxy</argument>\n</arguments>\n</type>\n+ <type name=\"Magento\\Payment\\Model\\Method\\Adapter\">\n+ <plugin name=\"amazon_payv2_pay_action\" type=\"Amazon\\PayV2\\Plugin\\ModelMethodAdapter\" sortOrder=\"1\" />\n+ </type>\n</config>\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
ASD-515 changes capture on order + immediate to behave as authorize at first
21,270
24.11.2020 15:19:27
28,800
4374a941434e749d99fe37979f8b0742856f66aa
closes async authorization record on IPN calls
[ { "change_type": "MODIFY", "old_path": "src/PayV2/Controller/Payment/Ipn.php", "new_path": "src/PayV2/Controller/Payment/Ipn.php", "diff": "*/\nnamespace Amazon\\PayV2\\Controller\\Payment;\n+use Amazon\\PayV2\\Api\\Data\\AsyncInterface;\n+use Amazon\\PayV2\\Model\\Async;\nuse Magento\\Framework\\App\\ObjectManager;\nuse Aws\\Sns\\Message;\nuse Aws\\Sns\\MessageValidator;\n+use Magento\\Framework\\Data\\Collection;\n/**\n* Class Ipn\n@@ -47,6 +50,11 @@ class Ipn extends \\Magento\\Framework\\App\\Action\\Action\n*/\nprivate $ipnLogger;\n+ /**\n+ * @var \\Amazon\\PayV2\\Model\\ResourceModel\\Async\\CollectionFactory\n+ */\n+ private $asyncCollectionFactory;\n+\n/**\n* Ipn constructor.\n* @param \\Magento\\Framework\\App\\Action\\Context $context\n@@ -54,13 +62,15 @@ class Ipn extends \\Magento\\Framework\\App\\Action\\Action\n* @param \\Amazon\\PayV2\\Model\\AsyncManagement\\ChargeFactory $chargeFactory\n* @param \\Amazon\\PayV2\\Model\\AsyncManagement\\RefundFactory $refundFactory\n* @param \\Amazon\\PayV2\\Logger\\AsyncIpnLogger $ipnLogger\n+ * @param \\Amazon\\PayV2\\Model\\ResourceModel\\Async\\CollectionFactory $asyncCollectionFactory\n*/\npublic function __construct(\n\\Magento\\Framework\\App\\Action\\Context $context,\n\\Amazon\\PayV2\\Model\\AmazonConfig $amazonConfig,\n\\Amazon\\PayV2\\Model\\AsyncManagement\\ChargeFactory $chargeFactory,\n\\Amazon\\PayV2\\Model\\AsyncManagement\\RefundFactory $refundFactory,\n- \\Amazon\\PayV2\\Logger\\AsyncIpnLogger $ipnLogger\n+ \\Amazon\\PayV2\\Logger\\AsyncIpnLogger $ipnLogger,\n+ \\Amazon\\PayV2\\Model\\ResourceModel\\Async\\CollectionFactory $asyncCollectionFactory\n) {\n// Bypass Magento's CsrfValidator (which rejects POST) and use Amazon SNS Message Validator instead\n$context->getRequest()->setMethod('PUT');\n@@ -70,8 +80,13 @@ class Ipn extends \\Magento\\Framework\\App\\Action\\Action\n$this->chargeFactory = $chargeFactory;\n$this->refundFactory = $refundFactory;\n$this->ipnLogger = $ipnLogger;\n+ $this->asyncCollectionFactory = $asyncCollectionFactory;\n}\n+ /**\n+ * @return \\Magento\\Framework\\App\\ResponseInterface|\\Magento\\Framework\\Controller\\ResultInterface|void\n+ * @throws \\Exception\n+ */\npublic function execute()\n{\nif (!$this->amazonConfig->isEnabled()) {\n@@ -91,18 +106,23 @@ class Ipn extends \\Magento\\Framework\\App\\Action\\Action\n// Message Validator checks SigningCertURL, SignatureVersion, and Signature\nif ($validator->isValid($snsMessage)) {\n$message = json_decode($snsMessage['Message'], true);\n+ $asyncComplete = false;\n// Process message\nif (isset($message['ObjectType'])) {\nswitch ($message['ObjectType']) {\ncase 'CHARGE':\n- $this->chargeFactory->create()->processStateChange($message['ObjectId']);\n+ $asyncComplete = $this->chargeFactory->create()->processStateChange($message['ObjectId']);\nbreak;\ncase 'REFUND':\n- $this->refundFactory->create()->processRefund($message['ObjectId']);\n+ $asyncComplete = $this->refundFactory->create()->processRefund($message['ObjectId']);\nbreak;\n}\n}\n+\n+ if ($asyncComplete) {\n+ $this->completePending($message['ObjectId']);\n+ }\n} else {\n$this->ipnLogger->warning('Invalid SNS Message');\n}\n@@ -112,4 +132,21 @@ class Ipn extends \\Magento\\Framework\\App\\Action\\Action\nthrow $e;\n}\n}\n+\n+ /**\n+ * Complete successful async pending action\n+ *\n+ * @param $asyncId\n+ */\n+ protected function completePending($asyncId)\n+ {\n+ $collection = $this->asyncCollectionFactory\n+ ->create()\n+ ->addFilter(AsyncInterface::PENDING_ID, $asyncId)\n+ ->setPageSize(1);\n+\n+ foreach ($collection as $async) {\n+ $async->setIsPending(false)->save();\n+ }\n+ }\n}\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
ASD-515 closes async authorization record on IPN calls
21,270
25.11.2020 11:03:14
28,800
805660cdbc338bbcd2eeeb176492389ba791a1c3
does not render button on pdp when product out of stock
[ { "change_type": "MODIFY", "old_path": "src/PayV2/Block/ProductPagePaymentLink.php", "new_path": "src/PayV2/Block/ProductPagePaymentLink.php", "diff": "*/\nnamespace Amazon\\PayV2\\Block;\n+use Magento\\ConfigurableProduct\\Model\\Product\\Type\\Configurable;\n+\nclass ProductPagePaymentLink extends \\Magento\\Framework\\View\\Element\\Template\n{\n@@ -56,6 +58,21 @@ class ProductPagePaymentLink extends \\Magento\\Framework\\View\\Element\\Template\nreturn '';\n}\n+ // check for product stock and/or saleability\n+ $product = $this->_getProduct();\n+ // configurable products\n+ if ($product->getTypeId() == Configurable::TYPE_CODE) {\n+ if (!$product->isSaleable()) {\n+ return '';\n+ }\n+ }\n+ // other product types\n+ else {\n+ if ($product->isInStock() == 0 || !$product->isSaleable()) {\n+ return '';\n+ }\n+ }\n+\nreturn parent::_toHtml();\n}\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
ASD-567 does not render button on pdp when product out of stock
21,241
25.11.2020 13:31:59
21,600
e26a14cbd07e37f08ce80f160144f80088643c0b
make sure the charge_permission_id gets saved to the payment
[ { "change_type": "MODIFY", "old_path": "src/PayV2/Model/CheckoutSessionManagement.php", "new_path": "src/PayV2/Model/CheckoutSessionManagement.php", "diff": "@@ -637,8 +637,9 @@ class CheckoutSessionManagement implements \\Amazon\\PayV2\\Api\\CheckoutSessionMana\n$payment = $order->getPayment();\n$chargeId = $amazonResult['chargeId'];\n$transaction = $this->getTransaction($amazonResult['checkoutSessionId']);\n- $this->updateTransactionId($chargeId, $payment, $transaction);\n+ // relies on updateTransactionId to save the $payment\n$payment->setAdditionalInformation('charge_permission_id', $amazonResult['chargePermissionId']);\n+ $this->updateTransactionId($chargeId, $payment, $transaction);\nif ($completeCheckoutStatus != '202' && $this->amazonConfig->getPaymentAction() == PaymentAction::AUTHORIZE_AND_CAPTURE) {\n// capture on Amazon Pay\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
ASD-515 - make sure the charge_permission_id gets saved to the payment
21,241
25.11.2020 13:32:16
21,600
14ce21d8cef52d17c761f99209d9fec372a9fd23
update test for async declined to look for canceled instead of on hold
[ { "change_type": "MODIFY", "old_path": "src/PayV2/Test/Mftf/Test/AmazonInvoicePendingDeclinedV2Test.xml", "new_path": "src/PayV2/Test/Mftf/Test/AmazonInvoicePendingDeclinedV2Test.xml", "diff": "<actionGroup ref=\"AdminOpenOrderByEntityIdActionGroup\" stepKey=\"openOrder\">\n<argument name=\"entityId\" value=\"{$grabOrderId}\"/>\n</actionGroup>\n- <see selector=\"{{AdminOrderDetailsInformationSection.orderStatus}}\" userInput=\"On Hold\" stepKey=\"seeOnHoldStatus\"/>\n+ <see selector=\"{{AdminOrderDetailsInformationSection.orderStatus}}\" userInput=\"Canceled\" stepKey=\"seeCanceledStatus\"/>\n</test>\n</tests>\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
ASD-515 - update test for async declined to look for canceled instead of on hold
21,241
30.11.2020 10:58:16
21,600
a8ba3a447def510e8fc363c639d44593977f7d88
adjust cookie clearing to ensure logged out from Amazon
[ { "change_type": "MODIFY", "old_path": "src/PayV2/Test/Mftf/Test/AmazonSignInToExistingTest.xml", "new_path": "src/PayV2/Test/Mftf/Test/AmazonSignInToExistingTest.xml", "diff": "<!-- Log out and return to sign in page -->\n<actionGroup stepKey=\"logout\" ref=\"StorefrontCustomerLogoutActionGroup\"/>\n<waitForPageLoad time=\"30\" stepKey=\"waitLogoutPageFullyLoaded\"/>\n- <!-- make sure we are logged out from Amazon by clearing ubid-main cookie -->\n- <resetCookie userInput=\"ubid-main\" parameterArray=\"['domainName' => '.amazon.com']\" stepKey=\"resetCookieForAmazon\"/>\n<amOnPage url=\"{{StorefrontCustomerSignInPage.url}}\" stepKey=\"amOnSignInPage2\"/>\n<waitForPageLoad time=\"30\" stepKey=\"waitPageFullyLoaded\"/>\n<!--Verify Sign in with Amazon Button V2 is present again-->\n<click selector=\"{{AmazonLoginSection.v2Login}}\" stepKey=\"clickSignInWithAmazonButton2\"/>\n+ <!-- make sure we are logged out from Amazon by clearing ubid-main cookie -->\n+ <resetCookie userInput=\"ubid-main\" parameterArray=\"['domainName' => '.amazon.com']\" stepKey=\"resetCookieForAmazon\"/>\n+ <reloadPage stepKey=\"reloadAmazonLoginPage\"/>\n+\n<actionGroup ref=\"AmazonLoginOnlyActionGroup\" stepKey=\"AmazonLoginOnlyActionGroup2\"/>\n<click selector=\"{{AmazonLoginSection.consentButton}}\" stepKey=\"clickAmazonConsentButton2\"/>\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
APF-224 - adjust cookie clearing to ensure logged out from Amazon
21,241
03.12.2020 09:21:41
21,600
6786c08d3cdf41e432170deea23acc118e1993c4
don't save the invoice before it is paid because it triggers an odd Magento bug
[ { "change_type": "MODIFY", "old_path": "src/PayV2/Model/CheckoutSessionManagement.php", "new_path": "src/PayV2/Model/CheckoutSessionManagement.php", "diff": "@@ -494,7 +494,7 @@ class CheckoutSessionManagement implements \\Amazon\\PayV2\\Api\\CheckoutSessionMana\n$this->paymentRepository->save($payment);\nif ($invoice = $payment->getCreatedInvoice()) {\n- $invoice->setTransactionId($chargeId)->save();\n+ $invoice->setTransactionId($chargeId);\n}\n}\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
ASD-515 - don't save the invoice before it is paid because it triggers an odd Magento bug
21,241
03.12.2020 13:21:21
21,600
a6788b3136b84e8c6b562a2c64ca165a46b0285d
disable CV1 mixin to prevent js errors
[ { "change_type": "MODIFY", "old_path": "src/PayV2/view/frontend/requirejs-config.js", "new_path": "src/PayV2/view/frontend/requirejs-config.js", "diff": "@@ -19,7 +19,8 @@ var config = {\n'Amazon_PayV2/js/view/payment/list-mixin': true\n},\n'Magento_Tax/js/view/checkout/summary/grand-total': {\n- 'Amazon_PayV2/js/view/checkout/summary/grand-total-mixin': true\n+ 'Amazon_PayV2/js/view/checkout/summary/grand-total-mixin': true,\n+ 'Amazon_Payment/js/view/checkout/summary/grand-total-mixin': false\n}\n}\n},\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
ASD-582 - disable CV1 mixin to prevent js errors
21,241
07.12.2020 16:47:47
21,600
8b18d2ca01a188ed9d95dbef6d56a23844df3b83
move the transaction ID update back to end of completeCheckoutSession, something was overwriting the transaction ID that we had set. Also had to restore saving the invoice when setting there, as it no longer gets saved by following code.
[ { "change_type": "MODIFY", "old_path": "src/PayV2/Model/CheckoutSessionManagement.php", "new_path": "src/PayV2/Model/CheckoutSessionManagement.php", "diff": "@@ -494,7 +494,7 @@ class CheckoutSessionManagement implements \\Amazon\\PayV2\\Api\\CheckoutSessionMana\n$this->paymentRepository->save($payment);\nif ($invoice = $payment->getCreatedInvoice()) {\n- $invoice->setTransactionId($chargeId);\n+ $invoice->setTransactionId($chargeId)->save();\n}\n}\n@@ -617,8 +617,8 @@ class CheckoutSessionManagement implements \\Amazon\\PayV2\\Api\\CheckoutSessionMana\n'order_id' => $orderId,\n];\n- $amazonResult = $this->amazonAdapter->completeCheckoutSession($cart->getStoreId(), $checkoutSession->getSessionId(), $cart->getGrandTotal() , $cart->getQuoteCurrencyCode());\n- $completeCheckoutStatus = $amazonResult['status'] ?? '404';\n+ $amazonCompleteCheckoutResult = $this->amazonAdapter->completeCheckoutSession($cart->getStoreId(), $checkoutSession->getSessionId(), $cart->getGrandTotal() , $cart->getQuoteCurrencyCode());\n+ $completeCheckoutStatus = $amazonCompleteCheckoutResult['status'] ?? '404';\nif (!preg_match('/^2\\d\\d$/', $completeCheckoutStatus)){\n// Something went wrong, but the order has already been placed, so cancelling it\n$this->cancelOrder($order);\n@@ -635,11 +635,8 @@ class CheckoutSessionManagement implements \\Amazon\\PayV2\\Api\\CheckoutSessionMana\n}\n$payment = $order->getPayment();\n- $chargeId = $amazonResult['chargeId'];\n- $transaction = $this->getTransaction($amazonResult['checkoutSessionId']);\n- // relies on updateTransactionId to save the $payment\n- $payment->setAdditionalInformation('charge_permission_id', $amazonResult['chargePermissionId']);\n- $this->updateTransactionId($chargeId, $payment, $transaction);\n+ $chargeId = $amazonCompleteCheckoutResult['chargeId'];\n+ $transaction = $this->getTransaction($amazonCompleteCheckoutResult['checkoutSessionId']);\nif ($completeCheckoutStatus != '202' && $this->amazonConfig->getPaymentAction() == PaymentAction::AUTHORIZE_AND_CAPTURE) {\n// capture on Amazon Pay\n@@ -674,6 +671,10 @@ class CheckoutSessionManagement implements \\Amazon\\PayV2\\Api\\CheckoutSessionMana\nbreak;\n}\n+ // relies on updateTransactionId to save the $payment\n+ $payment->setAdditionalInformation('charge_permission_id', $amazonCompleteCheckoutResult['chargePermissionId']);\n+ $this->updateTransactionId($chargeId, $payment, $transaction);\n+\n$checkoutSession->complete();\n$this->checkoutSessionRepository->save($checkoutSession);\n} catch (\\Exception $e) {\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
ASD-515 - move the transaction ID update back to end of completeCheckoutSession, something was overwriting the transaction ID that we had set. Also had to restore saving the invoice when setting there, as it no longer gets saved by following code.
21,241
09.12.2020 16:04:56
21,600
6bf5f1042c516c2426ce14acdfbc6f10dd25ec76
add async decline test
[ { "change_type": "ADD", "old_path": null, "new_path": "src/PayV2/Test/Mftf/Test/AmazonCheckoutAsyncDeclinedTest.xml", "diff": "+<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n+<tests xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"urn:magento:mftf:Test/etc/testSchema.xsd\">\n+ <test name=\"AmazonCheckoutAsyncDecline\" extends=\"AmazonCheckoutButtonV2\">\n+ <annotations>\n+ <stories value=\"Amazon Checkout Async Decline\"/>\n+ <title value=\"Amazon Checkout Async Decline\"/>\n+ <description value=\"Async transactions that are declined should cancel the order\"/>\n+ <severity value=\"CRITICAL\"/>\n+ <group value=\"amazon_pay_v2\"/>\n+ <group value=\"amazon_pay_v2_checkout\"/>\n+ </annotations>\n+\n+ <before>\n+ <magentoCLI command=\"config:set payment/amazon_payment/authorization_mode synchronous_possible\" stepKey=\"setAuthModeAutomatic\" before=\"flushCache\"/>\n+ </before>\n+\n+ <after>\n+ <magentoCLI command=\"config:set payment/amazon_payment/authorization_mode synchronous\" stepKey=\"setAuthModeImmediate\"/>\n+ <magentoCLI command=\"cache:flush\" stepKey=\"flushCache\"/>\n+ </after>\n+\n+ <!--Go to Amazon Pay from the checkout and login-->\n+ <click selector=\"{{AmazonButtonSection.v2Checkout}}\" stepKey=\"clickAmazonButton\"/>\n+ <actionGroup ref=\"AmazonLoginActionGroup\" stepKey=\"AmazonLoginActionGroup\"/>\n+ <!--Come back to checkout with default address-->\n+ <actionGroup ref=\"AmazonCheckoutActionGroup\" stepKey=\"DefaultAmazonCheckoutActionGroup\">\n+ <argument name=\"cc\" value=\"4354\" />\n+ </actionGroup>\n+ <!--Go to payment method-->\n+ <click selector=\"{{CheckoutShippingSection.next}}\" stepKey=\"clickCheckoutShippingNext\"/>\n+ <waitForPageLoad stepKey=\"waitForCheckoutPaymentPageLoad\"/>\n+ <!--Verify Amazon Pay method is visible-->\n+ <seeNumberOfElements selector=\"{{CheckoutPaymentSection.availablePaymentSolutions}}\" userInput=\"1\" stepKey=\"seeSingleAvailablePaymentSolution\"/>\n+ <!--Place order-->\n+ <actionGroup ref=\"CheckoutPlaceOrderActionGroup\" stepKey=\"guestPlaceorder\">\n+ <argument name=\"orderNumberMessage\" value=\"CONST.successGuestCheckoutOrderNumberMessage\" />\n+ <argument name=\"emailYouMessage\" value=\"CONST.successCheckoutEmailYouMessage\" />\n+ </actionGroup>\n+ <grabTextFrom selector=\"{{CheckoutSuccessMainSection.orderNumber}}\" stepKey=\"grabOrderNumber\"/>\n+ <!--Login as admin-->\n+ <actionGroup ref=\"AdminLoginActionGroup\" stepKey=\"loginAsAdmin\"/>\n+ <!--Open created order in backend-->\n+ <amOnPage url=\"{{AdminOrdersPage.url}}\" stepKey=\"goToOrders\"/>\n+ <waitForPageLoad stepKey=\"waitForOrdersPageLoad\"/>\n+ <actionGroup ref=\"OpenOrderByIdActionGroup\" stepKey=\"filterOrderGridById\">\n+ <argument name=\"orderId\" value=\"$grabOrderNumber\"/>\n+ </actionGroup>\n+ <grabFromCurrentUrl regex=\"~/order_id/(\\d+)/~\" stepKey=\"grabOrderId\"/>\n+ <actionGroup ref=\"AdminOpenOrderByEntityIdActionGroup\" stepKey=\"openOrder\">\n+ <argument name=\"entityId\" value=\"{$grabOrderId}\"/>\n+ </actionGroup>\n+ <see selector=\"{{AdminOrderDetailsInformationSection.orderStatus}}\" userInput=\"Payment Review\" stepKey=\"seePaymentReviewedStatus\"/>\n+\n+ <!-- run async processing, which will cancel the order -->\n+ <magentoCLI command=\"amazon:payment:async:process\" stepKey=\"updateStatus\"/>\n+\n+ <actionGroup ref=\"AdminOpenOrderByEntityIdActionGroup\" stepKey=\"openOrderAgain\">\n+ <argument name=\"entityId\" value=\"{$grabOrderId}\"/>\n+ </actionGroup>\n+ <see selector=\"{{AdminOrderDetailsInformationSection.orderStatus}}\" userInput=\"Canceled\" stepKey=\"seeCanceledStatus\"/>\n+ </test>\n+</tests>\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
ASD-569 - add async decline test
21,241
09.12.2020 17:48:45
21,600
d33072d95207426714efcf66505e198d428f428d
add async success test
[ { "change_type": "ADD", "old_path": null, "new_path": "src/PayV2/Test/Mftf/Test/AmazonCheckoutAsyncSuccessTest.xml", "diff": "+<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n+<tests xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"urn:magento:mftf:Test/etc/testSchema.xsd\">\n+ <test name=\"AmazonCheckoutAsyncSuccess\" extends=\"AmazonCheckoutButtonV2\">\n+ <annotations>\n+ <stories value=\"Amazon Checkout Async Success\"/>\n+ <title value=\"Amazon Checkout Async Success\"/>\n+ <description value=\"Async transactions that are approved should go to processing\"/>\n+ <severity value=\"CRITICAL\"/>\n+ <group value=\"amazon_pay_v2\"/>\n+ <group value=\"amazon_pay_v2_checkout\"/>\n+ </annotations>\n+\n+ <before>\n+ <magentoCLI command=\"config:set payment/amazon_payment/authorization_mode synchronous_possible\" stepKey=\"setAuthModeAutomatic\" before=\"flushCache\"/>\n+ </before>\n+\n+ <after>\n+ <magentoCLI command=\"config:set payment/amazon_payment/authorization_mode synchronous\" stepKey=\"setAuthModeImmediate\"/>\n+ <magentoCLI command=\"cache:flush\" stepKey=\"flushCache\"/>\n+ </after>\n+\n+ <!--Go to Amazon Pay from the checkout and login-->\n+ <click selector=\"{{AmazonButtonSection.v2Checkout}}\" stepKey=\"clickAmazonButton\"/>\n+ <actionGroup ref=\"AmazonLoginActionGroup\" stepKey=\"AmazonLoginActionGroup\"/>\n+ <!--Come back to checkout with default address-->\n+ <actionGroup ref=\"AmazonCheckoutActionGroup\" stepKey=\"DefaultAmazonCheckoutActionGroup\">\n+ <argument name=\"cc\" value=\"0701\" />\n+ </actionGroup>\n+ <!--Go to payment method-->\n+ <click selector=\"{{CheckoutShippingSection.next}}\" stepKey=\"clickCheckoutShippingNext\"/>\n+ <waitForPageLoad stepKey=\"waitForCheckoutPaymentPageLoad\"/>\n+ <!--Verify Amazon Pay method is visible-->\n+ <seeNumberOfElements selector=\"{{CheckoutPaymentSection.availablePaymentSolutions}}\" userInput=\"1\" stepKey=\"seeSingleAvailablePaymentSolution\"/>\n+ <!--Place order-->\n+ <actionGroup ref=\"CheckoutPlaceOrderActionGroup\" stepKey=\"guestPlaceorder\">\n+ <argument name=\"orderNumberMessage\" value=\"CONST.successGuestCheckoutOrderNumberMessage\" />\n+ <argument name=\"emailYouMessage\" value=\"CONST.successCheckoutEmailYouMessage\" />\n+ </actionGroup>\n+ <grabTextFrom selector=\"{{CheckoutSuccessMainSection.orderNumber}}\" stepKey=\"grabOrderNumber\"/>\n+ <!--Login as admin-->\n+ <actionGroup ref=\"AdminLoginActionGroup\" stepKey=\"loginAsAdmin\"/>\n+ <!--Open created order in backend-->\n+ <amOnPage url=\"{{AdminOrdersPage.url}}\" stepKey=\"goToOrders\"/>\n+ <waitForPageLoad stepKey=\"waitForOrdersPageLoad\"/>\n+ <actionGroup ref=\"OpenOrderByIdActionGroup\" stepKey=\"filterOrderGridById\">\n+ <argument name=\"orderId\" value=\"$grabOrderNumber\"/>\n+ </actionGroup>\n+ <grabFromCurrentUrl regex=\"~/order_id/(\\d+)/~\" stepKey=\"grabOrderId\"/>\n+ <actionGroup ref=\"AdminOpenOrderByEntityIdActionGroup\" stepKey=\"openOrder\">\n+ <argument name=\"entityId\" value=\"{$grabOrderId}\"/>\n+ </actionGroup>\n+ <see selector=\"{{AdminOrderDetailsInformationSection.orderStatus}}\" userInput=\"Payment Review\" stepKey=\"seePaymentReviewedStatus\"/>\n+\n+ <!-- run async processing, which will put the order in Processing -->\n+ <magentoCLI command=\"amazon:payment:async:process\" stepKey=\"updateStatus\"/>\n+\n+ <!--Open order and verify status is Processing-->\n+ <actionGroup ref=\"AdminOpenOrderByEntityIdActionGroup\" stepKey=\"openOrderAgain\">\n+ <argument name=\"entityId\" value=\"{$grabOrderId}\"/>\n+ </actionGroup>\n+ <see selector=\"{{AdminOrderDetailsInformationSection.orderStatus}}\" userInput=\"Processing\" stepKey=\"seeProcessingStatus\"/>\n+ </test>\n+</tests>\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
ASD-569 - add async success test
21,241
10.12.2020 14:08:47
21,600
ab9421fe223c746affa1b77fb745fd058fd5df7a
make sure we can capture against an invoice, to prevent duplicate order comments in case we receive multiple IPN messages
[ { "change_type": "MODIFY", "old_path": "src/PayV2/Model/AsyncManagement/Charge.php", "new_path": "src/PayV2/Model/AsyncManagement/Charge.php", "diff": "@@ -266,7 +266,7 @@ class Charge extends AbstractOperation\n$invoice = $this->invoiceService->prepareInvoice($order);\n$invoice->register();\n}\n- if ($invoice) {\n+ if ($invoice && $invoice->canCapture()) {\n$payment = $order->getPayment();\n$invoice->pay();\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
ASD-515 - make sure we can capture against an invoice, to prevent duplicate order comments in case we receive multiple IPN messages
21,261
11.12.2020 12:18:14
-3,600
28679c4c6dd9678e997b0a3a639af7a1e51ace9e
version increase to 2.7.0
[ { "change_type": "MODIFY", "old_path": "README.md", "new_path": "README.md", "diff": "@@ -113,4 +113,4 @@ The following table provides an overview on which Git branch is compatible to wh\n| Magento Version | Github Branch | Latest release |\n| ------------- | ------------- | ------------- |\n| 2.2.6 - 2.3.x | [V2checkout-1.2.x](https://github.com/amzn/amazon-payments-magento-2-plugin/tree/V2checkout-1.2.x) | 1.9.0 |\n-| 2.4.0 and above | [V2checkout](https://github.com/amzn/amazon-payments-magento-2-plugin/tree/V2checkout) | 2.6.0 |\n+| 2.4.0 and above | [V2checkout](https://github.com/amzn/amazon-payments-magento-2-plugin/tree/V2checkout) | 2.7.0 |\n" }, { "change_type": "MODIFY", "old_path": "composer.json", "new_path": "composer.json", "diff": "\"name\": \"amzn/amazon-pay-v2-magento-2-module\",\n\"description\": \"Official Magento2 Plugin to integrate with Amazon Pay V2\",\n\"type\": \"magento2-module\",\n- \"version\": \"2.6.0\",\n+ \"version\": \"2.7.0\",\n\"license\": [\n\"Apache-2.0\"\n],\n\"magento/module-quote\": \"*\",\n\"magento/module-customer\": \"*\",\n\"magento/module-store\": \"*\",\n- \"zendframework/zend-crypt\": \"^2.6.0\",\n+ \"zendframework/zend-crypt\": \"^2.7.0\",\n\"amzn/amazon-pay-api-sdk-php\": \"^2.2\",\n\"aws/aws-php-sns-message-validator\": \"^1.5\"\n},\n" }, { "change_type": "MODIFY", "old_path": "src/PayV2/composer.json", "new_path": "src/PayV2/composer.json", "diff": "\"name\": \"amzn/amazon-pay-v2-module\",\n\"description\": \"Amazon Pay V2 module\",\n\"type\": \"magento2-module\",\n- \"version\": \"2.6.0\",\n+ \"version\": \"2.7.0\",\n\"license\": [\n\"Apache-2.0\"\n],\n\"magento/module-catalog\": \"*\",\n\"magento/module-paypal\": \"*\",\n\"magento/module-directory\": \"*\",\n- \"zendframework/zend-crypt\": \"^2.6.0\",\n+ \"zendframework/zend-crypt\": \"^2.7.0\",\n\"amzn/amazon-pay-api-sdk-php\": \"^2.2\",\n\"aws/aws-php-sns-message-validator\": \"^1.5\"\n},\n" }, { "change_type": "MODIFY", "old_path": "src/PayV2/etc/module.xml", "new_path": "src/PayV2/etc/module.xml", "diff": "*/\n-->\n<config xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"urn:magento:framework:Module/etc/module.xsd\">\n- <module name=\"Amazon_PayV2\" setup_version=\"2.6.0\" >\n+ <module name=\"Amazon_PayV2\" setup_version=\"2.7.0\" >\n<sequence>\n<module name=\"Amazon_Core\"/>\n<module name=\"Amazon_Login\"/>\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
version increase to 2.7.0
21,241
11.12.2020 17:52:12
21,600
9be62d73f8c0f9694d6f2a5ac4e915e50f395d0a
fix for capturing pending auths after 7 days that return state of captureInitiated
[ { "change_type": "MODIFY", "old_path": "src/PayV2/Model/AsyncManagement/Charge.php", "new_path": "src/PayV2/Model/AsyncManagement/Charge.php", "diff": "@@ -20,6 +20,7 @@ use Amazon\\PayV2\\Model\\Config\\Source\\PaymentAction;\nuse Magento\\Sales\\Api\\Data\\TransactionInterface as Transaction;\nuse Magento\\Sales\\Api\\Data\\InvoiceInterface;\nuse Magento\\Sales\\Api\\Data\\OrderInterface;\n+use Magento\\Sales\\Model\\Order;\nclass Charge extends AbstractOperation\n{\n@@ -266,7 +267,7 @@ class Charge extends AbstractOperation\n$invoice = $this->invoiceService->prepareInvoice($order);\n$invoice->register();\n}\n- if ($invoice && $invoice->canCapture()) {\n+ if ($invoice && ($invoice->canCapture() || $invoice->getOrder()->getStatus() == Order::STATE_PAYMENT_REVIEW)) {\n$payment = $order->getPayment();\n$invoice->pay();\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
ASD-515 - fix for capturing pending auths after 7 days that return state of captureInitiated
21,241
14.12.2020 16:51:00
21,600
0185cb5396d0f81e15c04994e19c650df7f22cf9
update composer.json and module.xml for re-packaged module name/version, and expand php compatibility to match supported Magento versions
[ { "change_type": "MODIFY", "old_path": "composer.json", "new_path": "composer.json", "diff": "{\n- \"name\": \"amzn/amazon-pay-v2-magento-2-module\",\n- \"description\": \"Official Magento2 Plugin to integrate with Amazon Pay V2\",\n+ \"name\": \"amzn/amazon-pay-magento-2-module\",\n+ \"description\": \"Official Magento2 Plugin to integrate with Amazon Pay\",\n\"type\": \"magento2-module\",\n- \"version\": \"2.7.0\",\n+ \"version\": \"5.0.0\",\n\"license\": [\n\"Apache-2.0\"\n],\n\"phpunit/phpunit\": \"4.1.0\"\n},\n\"require\": {\n- \"php\": \"~7.3.0||~7.4.0\",\n+ \"php\": \"~7.0.13||~7.1.0||~7.3.0||~7.4.0\",\n\"magento/framework\": \"*\",\n\"magento/module-sales\": \"*\",\n\"magento/module-checkout\": \"*\",\n" }, { "change_type": "MODIFY", "old_path": "src/PayV2/etc/module.xml", "new_path": "src/PayV2/etc/module.xml", "diff": "*/\n-->\n<config xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"urn:magento:framework:Module/etc/module.xsd\">\n- <module name=\"Amazon_PayV2\" setup_version=\"2.7.0\" >\n+ <module name=\"Amazon_PayV2\" setup_version=\"1.0.0\" >\n<sequence>\n<module name=\"Amazon_Core\"/>\n<module name=\"Amazon_Login\"/>\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
APF-266 - update composer.json and module.xml for re-packaged module name/version, and expand php compatibility to match supported Magento versions
21,241
14.12.2020 17:47:43
21,600
b78e21e730952172d23b2ac44ff66772afac7c27
remove customer account redirect customization that was incompatible with 2.3. Re-implement as plugin if functionality is desired.
[ { "change_type": "MODIFY", "old_path": "src/PayV2/Controller/Login.php", "new_path": "src/PayV2/Controller/Login.php", "diff": "@@ -20,7 +20,7 @@ use Amazon\\PayV2\\Api\\Data\\AmazonCustomerInterface;\nuse Amazon\\PayV2\\Domain\\AmazonCustomerFactory;\nuse Amazon\\PayV2\\Model\\AmazonConfig;\nuse Amazon\\PayV2\\Model\\Validator\\AccessTokenRequestValidator;\n-use Amazon\\PayV2\\Model\\Customer\\Account\\Redirect as AccountRedirect;\n+use Magento\\Customer\\Model\\Account\\Redirect as AccountRedirect;\nuse Amazon\\PayV2\\Helper\\Session;\nuse Magento\\Customer\\Api\\AccountManagementInterface;\nuse Magento\\Customer\\Model\\Session as CustomerSession;\n" }, { "change_type": "MODIFY", "old_path": "src/PayV2/Controller/Login/ValidatePost.php", "new_path": "src/PayV2/Controller/Login/ValidatePost.php", "diff": "@@ -18,7 +18,7 @@ namespace Amazon\\PayV2\\Controller\\Login;\nuse Amazon\\PayV2\\Api\\CustomerLinkManagementInterface;\nuse Amazon\\PayV2\\Domain\\ValidationCredentials;\nuse Amazon\\PayV2\\Helper\\Session;\n-use Amazon\\PayV2\\Model\\Customer\\Account\\Redirect as AccountRedirect;\n+use Magento\\Customer\\Model\\Account\\Redirect as AccountRedirect;\nuse Magento\\Customer\\Model\\CustomerRegistry;\nuse Magento\\Framework\\App\\Action\\Action;\nuse Magento\\Framework\\App\\Action\\Context;\n" }, { "change_type": "MODIFY", "old_path": "src/PayV2/etc/di.xml", "new_path": "src/PayV2/etc/di.xml", "diff": "<type name=\"Magento\\Sales\\Api\\OrderCustomerManagementInterface\">\n<plugin name=\"amazon_login_order_customer_service\" type=\"Amazon\\PayV2\\Plugin\\OrderCustomerManagement\" sortOrder=\"1\" />\n</type>\n- <type name=\"Amazon\\PayV2\\Model\\Customer\\Account\\Redirect\">\n- <arguments>\n- <argument name=\"checkoutSession\" xsi:type=\"object\">Magento\\Checkout\\Model\\Session\\Proxy</argument>\n- <argument name=\"customerSession\" xsi:type=\"object\">Magento\\Customer\\Model\\Session\\Proxy</argument>\n- </arguments>\n- </type>\n<type name=\"Magento\\Payment\\Model\\Method\\Adapter\">\n<plugin name=\"amazon_payv2_pay_action\" type=\"Amazon\\PayV2\\Plugin\\ModelMethodAdapter\" sortOrder=\"1\" />\n</type>\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
APF-266 - remove customer account redirect customization that was incompatible with 2.3. Re-implement as plugin if functionality is desired.
21,241
15.12.2020 14:09:12
21,600
026481e37e9715d70aaa4b7c38056dbcdeab85cd
update tests for 2.3
[ { "change_type": "MODIFY", "old_path": "src/PayV2/Test/Mftf-23/Test/AmazonCheckoutAsyncDeclinedTest.xml", "new_path": "src/PayV2/Test/Mftf-23/Test/AmazonCheckoutAsyncDeclinedTest.xml", "diff": "<!-- run async processing, which will cancel the order -->\n<magentoCLI command=\"amazon:payment:async:process\" stepKey=\"updateStatus\"/>\n- <amOnPage url=\"{{AdminOrderPage.url({$grabOrderId})}}\" stepKey=\"openOrderAgain\"/>\n+ <!-- Open created order in backend -->\n+ <amOnPage url=\"{{AdminOrdersPage.url}}\" stepKey=\"goToOrders2\"/>\n+ <waitForPageLoad stepKey=\"waitForOrdersPageLoad2\"/>\n+ <actionGroup ref=\"OpenOrderByIdActionGroup\" stepKey=\"filterOrderGridById2\">\n+ <argument name=\"orderId\" value=\"$grabOrderNumber\"/>\n+ </actionGroup>\n<see selector=\"{{AdminOrderDetailsInformationSection.orderStatus}}\" userInput=\"Canceled\" stepKey=\"seeCanceledStatus\"/>\n</test>\n</tests>\n" }, { "change_type": "MODIFY", "old_path": "src/PayV2/Test/Mftf-23/Test/AmazonCheckoutAsyncSuccessTest.xml", "new_path": "src/PayV2/Test/Mftf-23/Test/AmazonCheckoutAsyncSuccessTest.xml", "diff": "<actionGroup ref=\"OpenOrderByIdActionGroup\" stepKey=\"filterOrderGridById\">\n<argument name=\"orderId\" value=\"$grabOrderNumber\"/>\n</actionGroup>\n- <grabFromCurrentUrl regex=\"~/order_id/(\\d+)/~\" stepKey=\"grabOrderId\"/>\n- <actionGroup ref=\"AdminOpenOrderByEntityIdActionGroup\" stepKey=\"openOrder\">\n- <argument name=\"entityId\" value=\"{$grabOrderId}\"/>\n- </actionGroup>\n<see selector=\"{{AdminOrderDetailsInformationSection.orderStatus}}\" userInput=\"Payment Review\" stepKey=\"seePaymentReviewedStatus\"/>\n- <!-- run async processing, which will put the order in Processing -->\n+ <!-- run async processing after 30 seconds, which will put the order in Processing -->\n+ <wait time=\"30\" stepKey=\"waitForStatusUpdate\"/>\n<magentoCLI command=\"amazon:payment:async:process\" stepKey=\"updateStatus\"/>\n- <!--Open order and verify status is Processing-->\n- <actionGroup ref=\"AdminOpenOrderByEntityIdActionGroup\" stepKey=\"openOrderAgain\">\n- <argument name=\"entityId\" value=\"{$grabOrderId}\"/>\n+ <!-- Open created order in backend -->\n+ <amOnPage url=\"{{AdminOrdersPage.url}}\" stepKey=\"goToOrders2\"/>\n+ <waitForPageLoad stepKey=\"waitForOrdersPageLoad2\"/>\n+\n+ <actionGroup ref=\"OpenOrderByIdActionGroup\" stepKey=\"filterOrderGridById2\">\n+ <argument name=\"orderId\" value=\"$grabOrderNumber\"/>\n</actionGroup>\n<see selector=\"{{AdminOrderDetailsInformationSection.orderStatus}}\" userInput=\"Processing\" stepKey=\"seeProcessingStatus\"/>\n</test>\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
APF-266 - update tests for 2.3
21,241
17.12.2020 10:07:14
21,600
3352d3f604a9af16a727424490e892fd2901e725
test updates, giving async transactions time to update before processing the queue
[ { "change_type": "MODIFY", "old_path": "src/PayV2/Test/Mftf-24/Test/AmazonCheckoutAsyncDeclinedTest.xml", "new_path": "src/PayV2/Test/Mftf-24/Test/AmazonCheckoutAsyncDeclinedTest.xml", "diff": "<see selector=\"{{AdminOrderDetailsInformationSection.orderStatus}}\" userInput=\"Payment Review\" stepKey=\"seePaymentReviewedStatus\"/>\n<!-- run async processing, which will cancel the order -->\n+ <wait time=\"30\" stepKey=\"waitForStatusUpdate\"/>\n<magentoCLI command=\"amazon:payment:async:process\" stepKey=\"updateStatus\"/>\n<actionGroup ref=\"AdminOpenOrderByEntityIdActionGroup\" stepKey=\"openOrderAgain\">\n" }, { "change_type": "MODIFY", "old_path": "src/PayV2/Test/Mftf-24/Test/AmazonCheckoutAsyncSuccessTest.xml", "new_path": "src/PayV2/Test/Mftf-24/Test/AmazonCheckoutAsyncSuccessTest.xml", "diff": "<see selector=\"{{AdminOrderDetailsInformationSection.orderStatus}}\" userInput=\"Payment Review\" stepKey=\"seePaymentReviewedStatus\"/>\n<!-- run async processing, which will put the order in Processing -->\n+ <wait time=\"30\" stepKey=\"waitForStatusUpdate\"/>\n<magentoCLI command=\"amazon:payment:async:process\" stepKey=\"updateStatus\"/>\n<!--Open order and verify status is Processing-->\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
APF-270 - test updates, giving async transactions time to update before processing the queue
21,241
17.12.2020 13:32:25
21,600
d22d896410f89373269b2c6f309194cc2258224f
remove duplicate composer.json, and update top level to set a replace for the old module package names. Also remove zend-crypt requirement that is no longer needed.
[ { "change_type": "MODIFY", "old_path": "composer.json", "new_path": "composer.json", "diff": "\"license\": [\n\"Apache-2.0\"\n],\n+ \"replace\": {\n+ \"amzn/amazon-pay-and-login-magento-2-module\": \"*\",\n+ \"amzn/amazon-pay-and-login-with-amazon-core-module\": \"*\",\n+ \"amzn/login-with-amazon-module\": \"*\",\n+ \"amzn/amazon-pay-module\": \"*\",\n+ \"amzn/amazon-pay-v2-magento-2-module\": \"*\"\n+ },\n\"require-dev\": {\n\"guzzlehttp/guzzle\": \"^6.2.0\",\n\"phpunit/phpunit\": \"4.1.0\"\n\"magento/module-quote\": \"*\",\n\"magento/module-customer\": \"*\",\n\"magento/module-store\": \"*\",\n- \"zendframework/zend-crypt\": \"^2.7.0\",\n\"amzn/amazon-pay-api-sdk-php\": \"^2.2\",\n\"aws/aws-php-sns-message-validator\": \"^1.5\"\n},\n" }, { "change_type": "DELETE", "old_path": "src/PayV2/composer.json", "new_path": null, "diff": "-{\n- \"name\": \"amzn/amazon-pay-magento-2-module\",\n- \"description\": \"Amazon Pay V2 module\",\n- \"type\": \"magento2-module\",\n- \"version\": \"5.0.0\",\n- \"license\": [\n- \"Apache-2.0\"\n- ],\n- \"require\": {\n- \"php\": \"~7.0.13||~7.1.0||~7.3.0||~7.4.0\",\n- \"magento/framework\": \"*\",\n- \"magento/module-customer\": \"*\",\n- \"magento/module-eav\": \"*\",\n- \"magento/module-sales\": \"*\",\n- \"magento/module-quote\": \"*\",\n- \"magento/module-payment\": \"*\",\n- \"magento/module-backend\": \"*\",\n- \"magento/module-store\": \"*\",\n- \"magento/module-checkout\": \"*\",\n- \"magento/module-catalog\": \"*\",\n- \"magento/module-paypal\": \"*\",\n- \"magento/module-directory\": \"*\",\n- \"zendframework/zend-crypt\": \"^2.7.0\",\n- \"amzn/amazon-pay-api-sdk-php\": \"^2.2\",\n- \"aws/aws-php-sns-message-validator\": \"^1.5\"\n- },\n- \"suggest\": {\n- \"magento/module-customer\": \"*\",\n- \"magento/module-scalable-checkout\": \"*\",\n- \"magento/module-scalable-oms\": \"*\"\n- },\n- \"autoload\": {\n- \"files\": [\"registration.php\"],\n- \"psr-4\": {\n- \"Amazon\\\\PayV2\\\\\": \"\"\n- }\n- }\n-}\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
APF-268 - remove duplicate composer.json, and update top level to set a replace for the old module package names. Also remove zend-crypt requirement that is no longer needed.
21,241
17.12.2020 14:41:19
21,600
9c42ddd8772e606506e86da07089afab5c97443d
create source models that were re-used from CV1
[ { "change_type": "MODIFY", "old_path": "src/PayV2/Helper/Data.php", "new_path": "src/PayV2/Helper/Data.php", "diff": "@@ -180,11 +180,15 @@ class Data extends AbstractHelper\n$moduleName\n);\n$directoryRead = $this->readFactory->create($path);\n+\ntry {\n$composerJsonData = $directoryRead->readFile('composer.json');\n- } catch (Exception $e) {\n+ } catch (FileSystemException $e) {\n+ return '--';\n+ } catch (ValidatorException $e) {\nreturn '--';\n}\n+\n$data = json_decode($composerJsonData);\nreturn !empty($data->version) ? $data->version : __('Read error!');\n" }, { "change_type": "MODIFY", "old_path": "src/PayV2/etc/adminhtml/system.xml", "new_path": "src/PayV2/etc/adminhtml/system.xml", "diff": "</field>\n<field id=\"payment_region\" translate=\"label\" type=\"select\" sortOrder=\"60\" showInDefault=\"1\" showInWebsite=\"1\" showInStore=\"1\">\n<label>Payment Region</label>\n- <source_model>Amazon\\Core\\Model\\Config\\Source\\PaymentRegion</source_model>\n+ <source_model>Amazon\\PayV2\\Model\\Config\\Source\\PaymentRegion</source_model>\n<config_path>payment/amazon_payment/payment_region</config_path>\n</field>\n<field id=\"sandbox\" translate=\"label\" type=\"select\" sortOrder=\"70\" showInDefault=\"1\" showInWebsite=\"1\" showInStore=\"0\">\n</field>\n<field id=\"authorization_mode\" translate=\"label\" type=\"select\" sortOrder=\"40\" showInDefault=\"1\" showInWebsite=\"1\" showInStore=\"1\">\n<label>Authorization Mode</label>\n- <source_model>Amazon\\Core\\Model\\Config\\Source\\AuthorizationMode</source_model>\n+ <source_model>Amazon\\PayV2\\Model\\Config\\Source\\AuthorizationMode</source_model>\n<config_path>payment/amazon_payment/authorization_mode</config_path>\n</field>\n</group>\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
APF-273 - create source models that were re-used from CV1
21,241
17.12.2020 18:42:04
21,600
ece123778e675dfab8952bb6bd4390d5eb3675b2
remove CV1 tests
[ { "change_type": "DELETE", "old_path": "src/PayV2/Test/Mftf-23/Test/AmazonCheckoutButtonV1Test.xml", "new_path": null, "diff": "-<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n-<tests xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"urn:magento:mftf:Test/etc/testSchema.xsd\">\n- <test name=\"AmazonCheckoutButtonV1\">\n- <annotations>\n- <stories value=\"Amazon Button\"/>\n- <title value=\"Amazon Checkout Button V1\"/>\n- <description value=\"Only Amazon Button V1 should be present on checkout when enabled.\"/>\n- <severity value=\"CRITICAL\"/>\n- <group value=\"amazon_pay_v2\"/>\n- <group value=\"amazon_pay_v2_button\"/>\n- </annotations>\n-\n- <before>\n- <createData entity=\"SimpleTwo\" stepKey=\"createSimpleProduct\"/>\n- <createData entity=\"SampleAmazonPaymentV1Config\" stepKey=\"SampleAmazonPaymentV1ConfigData\"/>\n- <magentoCLI command=\"cache:flush\" stepKey=\"flushCache\"/>\n- </before>\n-\n- <!--Go to product page-->\n- <actionGroup ref=\"StorefrontOpenProductPageActionGroup\" stepKey=\"openProductStoreFront\">\n- <argument name=\"productUrl\" value=\"$$createSimpleProduct.custom_attributes[url_key]$$\"/>\n- </actionGroup>\n- <!--Click on Add To Cart button-->\n- <actionGroup ref=\"StorefrontAddToTheCartActionGroup\" stepKey=\"clickOnAddToCartButton\"/>\n- <!--Go to checkout-->\n- <actionGroup ref=\"GoToCheckoutFromMinicartActionGroup\" stepKey=\"goToCheckoutFromMiniCart\"/>\n- <!--Verify only Amazon Button V1 is present-->\n- <seeElement selector=\"{{AmazonButtonSection.v1Checkout}}\" stepKey=\"seeEnabledAmazonButton\"/>\n- <dontSeeElement selector=\"{{AmazonButtonSection.v2Checkout}}\" stepKey=\"dontSeeDisabledAmazonButton\"/>\n- </test>\n-</tests>\n" }, { "change_type": "DELETE", "old_path": "src/PayV2/Test/Mftf-23/Test/AmazonMiniCartButtonV1Test.xml", "new_path": null, "diff": "-<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n-<tests xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"urn:magento:mftf:Test/etc/testSchema.xsd\">\n- <test name=\"AmazonMiniCartButtonV1\">\n- <annotations>\n- <stories value=\"Amazon Button\"/>\n- <title value=\"Amazon Mini Cart Button V1\"/>\n- <description value=\"Only Amazon Button V1 should be present in mini cart when enabled.\"/>\n- <severity value=\"CRITICAL\"/>\n- <group value=\"amazon_pay_v2\"/>\n- <group value=\"amazon_pay_v2_button\"/>\n- </annotations>\n-\n- <before>\n- <createData entity=\"SimpleTwo\" stepKey=\"createSimpleProduct\"/>\n- <createData entity=\"SampleAmazonPaymentV1Config\" stepKey=\"SampleAmazonPaymentV1ConfigData\"/>\n- <magentoCLI command=\"config:set {{AmazonButtonMiniCartConfig.path}} 1\" stepKey=\"displayAmazonButtonMiniCart\"/>\n- <magentoCLI command=\"cache:flush\" stepKey=\"flushCache\"/>\n- </before>\n-\n- <!--Go to product page-->\n- <actionGroup ref=\"StorefrontOpenProductPageActionGroup\" stepKey=\"openProductStoreFront\">\n- <argument name=\"productUrl\" value=\"$$createSimpleProduct.custom_attributes[url_key]$$\"/>\n- </actionGroup>\n- <!--Click on Add To Cart button-->\n- <actionGroup ref=\"StorefrontAddToTheCartActionGroup\" stepKey=\"clickOnAddToCartButton\"/>\n- <!--Click on mini cart-->\n- <actionGroup ref=\"StorefrontClickOnMiniCartActionGroup\" stepKey=\"clickOnMiniCart\"/>\n- <!--Verify only Amazon Button V1 is present-->\n- <seeElement selector=\"{{AmazonButtonSection.v1MiniCart}}\" stepKey=\"seeEnabledAmazonButton\"/>\n- <dontSeeElement selector=\"{{AmazonButtonSection.v2MiniCart}}\" stepKey=\"dontSeeDisabledAmazonButton\"/>\n- </test>\n-</tests>\n" }, { "change_type": "DELETE", "old_path": "src/PayV2/Test/Mftf-23/Test/AmazonPaymentButtonV1Test.xml", "new_path": null, "diff": "-<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n-<tests xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"urn:magento:mftf:Test/etc/testSchema.xsd\">\n- <test name=\"AmazonPaymentButtonV1\">\n- <annotations>\n- <stories value=\"Amazon Button\"/>\n- <title value=\"Amazon Payment Button V1\"/>\n- <description value=\"Only Amazon Button V1 should be present in payment methods when enabled.\"/>\n- <severity value=\"CRITICAL\"/>\n- <group value=\"amazon_pay_v2\"/>\n- <group value=\"amazon_pay_v2_button\"/>\n- </annotations>\n-\n- <before>\n- <createData entity=\"SimpleTwo\" stepKey=\"createSimpleProduct\"/>\n- <createData entity=\"SampleAmazonPaymentV1Config\" stepKey=\"SampleAmazonPaymentV1ConfigData\"/>\n- <magentoCLI command=\"config:set {{AmazonButtonPaymentConfig.path}} 1\" stepKey=\"displayAmazonButtonPayment\"/>\n- <magentoCLI command=\"cache:flush\" stepKey=\"flushCache\"/>\n- </before>\n-\n- <!--Go to product page-->\n- <actionGroup ref=\"StorefrontOpenProductPageActionGroup\" stepKey=\"openProductStoreFront\">\n- <argument name=\"productUrl\" value=\"$$createSimpleProduct.custom_attributes[url_key]$$\"/>\n- </actionGroup>\n- <!--Click on Add To Cart button-->\n- <actionGroup ref=\"StorefrontAddToTheCartActionGroup\" stepKey=\"clickOnAddToCartButton\"/>\n- <!--Go to checkout-->\n- <actionGroup ref=\"GoToCheckoutFromMinicartActionGroup\" stepKey=\"goToCheckoutFromMiniCart\"/>\n- <!--Enter shipping information and continue to payments-->\n- <actionGroup ref=\"GuestCheckoutFillingShippingSectionActionGroup\" stepKey=\"guestCheckoutFillingShipping\">\n- <argument name=\"shippingMethod\" value=\"Flat Rate\"/>\n- </actionGroup>\n- <!--Verify only Amazon Payment Button V1 is present-->\n- <click selector=\"{{AmazonCheckoutSection.v1Method}}\" stepKey=\"selectEnabledAmazonPaymentMethod\"/>\n- <seeElement selector=\"{{AmazonButtonSection.v1Payment}}\" stepKey=\"seeEnabledAmazonButton\"/>\n- <dontSee selector=\"{{AmazonCheckoutSection.v2Method}}\" stepKey=\"dontSeeDisabledAmazonPaymentMethod\"/>\n- <dontSeeElement selector=\"{{AmazonButtonSection.v2Payment}}\" stepKey=\"dontSeeDisabledAmazonButton\"/>\n- </test>\n-</tests>\n" }, { "change_type": "DELETE", "old_path": "src/PayV2/Test/Mftf-23/Test/AmazonProductButtonV1Test.xml", "new_path": null, "diff": "-<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n-<tests xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"urn:magento:mftf:Test/etc/testSchema.xsd\">\n- <test name=\"AmazonProductButtonV1\">\n- <annotations>\n- <stories value=\"Amazon Button\"/>\n- <title value=\"Amazon Product Button V1\"/>\n- <description value=\"Only Amazon Button V1 should be present on product page when enabled.\"/>\n- <severity value=\"CRITICAL\"/>\n- <group value=\"amazon_pay_v2\"/>\n- <group value=\"amazon_pay_v2_button\"/>\n- </annotations>\n-\n- <before>\n- <createData entity=\"SimpleTwo\" stepKey=\"createSimpleProduct\"/>\n- <createData entity=\"SampleAmazonPaymentV1Config\" stepKey=\"SampleAmazonPaymentV1ConfigData\"/>\n- <magentoCLI command=\"config:set {{AmazonButtonProductConfig.path}} 1\" stepKey=\"displayAmazonButtonProduct\"/>\n- <magentoCLI command=\"cache:flush\" stepKey=\"flushCache\"/>\n- </before>\n-\n- <!--Go to product page-->\n- <actionGroup ref=\"StorefrontOpenProductPageActionGroup\" stepKey=\"openProductStoreFront\">\n- <argument name=\"productUrl\" value=\"$$createSimpleProduct.custom_attributes[url_key]$$\"/>\n- </actionGroup>\n- <!--Verify only Amazon Button V1 is present-->\n- <seeElement selector=\"{{AmazonButtonSection.v1Product}}\" stepKey=\"seeEnabledAmazonButton\"/>\n- <dontSeeElement selector=\"{{AmazonButtonSection.v2Product}}\" stepKey=\"dontSeeDisabledAmazonButton\"/>\n- </test>\n-</tests>\n" }, { "change_type": "DELETE", "old_path": "src/PayV2/Test/Mftf-24/Test/AmazonCheckoutButtonV1Test.xml", "new_path": null, "diff": "-<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n-<tests xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"urn:magento:mftf:Test/etc/testSchema.xsd\">\n- <test name=\"AmazonCheckoutButtonV1\">\n- <annotations>\n- <stories value=\"Amazon Button\"/>\n- <title value=\"Amazon Checkout Button V1\"/>\n- <description value=\"Only Amazon Button V1 should be present on checkout when enabled.\"/>\n- <severity value=\"CRITICAL\"/>\n- <group value=\"amazon_pay_v2\"/>\n- <group value=\"amazon_pay_v2_button\"/>\n- </annotations>\n-\n- <before>\n- <createData entity=\"SimpleTwo\" stepKey=\"createSimpleProduct\"/>\n- <createData entity=\"SampleAmazonPaymentV1Config\" stepKey=\"SampleAmazonPaymentV1ConfigData\"/>\n- <magentoCLI command=\"cache:flush\" stepKey=\"flushCache\"/>\n- </before>\n-\n- <!--Go to product page-->\n- <actionGroup ref=\"StorefrontOpenProductPageActionGroup\" stepKey=\"openProductStoreFront\">\n- <argument name=\"productUrl\" value=\"$$createSimpleProduct.custom_attributes[url_key]$$\"/>\n- </actionGroup>\n- <!--Click on Add To Cart button-->\n- <actionGroup ref=\"StorefrontAddToTheCartActionGroup\" stepKey=\"clickOnAddToCartButton\"/>\n- <!--Go to checkout-->\n- <actionGroup ref=\"GoToCheckoutFromMinicartActionGroup\" stepKey=\"goToCheckoutFromMiniCart\"/>\n- <!--Verify only Amazon Button V1 is present-->\n- <seeElement selector=\"{{AmazonButtonSection.v1Checkout}}\" stepKey=\"seeEnabledAmazonButton\"/>\n- <dontSeeElement selector=\"{{AmazonButtonSection.v2Checkout}}\" stepKey=\"dontSeeDisabledAmazonButton\"/>\n- </test>\n-</tests>\n" }, { "change_type": "DELETE", "old_path": "src/PayV2/Test/Mftf-24/Test/AmazonMiniCartButtonV1Test.xml", "new_path": null, "diff": "-<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n-<tests xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"urn:magento:mftf:Test/etc/testSchema.xsd\">\n- <test name=\"AmazonMiniCartButtonV1\">\n- <annotations>\n- <stories value=\"Amazon Button\"/>\n- <title value=\"Amazon Mini Cart Button V1\"/>\n- <description value=\"Only Amazon Button V1 should be present in mini cart when enabled.\"/>\n- <severity value=\"CRITICAL\"/>\n- <group value=\"amazon_pay_v2\"/>\n- <group value=\"amazon_pay_v2_button\"/>\n- </annotations>\n-\n- <before>\n- <createData entity=\"SimpleTwo\" stepKey=\"createSimpleProduct\"/>\n- <createData entity=\"SampleAmazonPaymentV1Config\" stepKey=\"SampleAmazonPaymentV1ConfigData\"/>\n- <magentoCLI command=\"config:set {{AmazonButtonMiniCartConfig.path}} 1\" stepKey=\"displayAmazonButtonMiniCart\"/>\n- <magentoCLI command=\"cache:flush\" stepKey=\"flushCache\"/>\n- </before>\n-\n- <!--Go to product page-->\n- <actionGroup ref=\"StorefrontOpenProductPageActionGroup\" stepKey=\"openProductStoreFront\">\n- <argument name=\"productUrl\" value=\"$$createSimpleProduct.custom_attributes[url_key]$$\"/>\n- </actionGroup>\n- <!--Click on Add To Cart button-->\n- <actionGroup ref=\"StorefrontAddToTheCartActionGroup\" stepKey=\"clickOnAddToCartButton\"/>\n- <!--Click on mini cart-->\n- <actionGroup ref=\"StorefrontClickOnMiniCartActionGroup\" stepKey=\"clickOnMiniCart\"/>\n- <!--Verify only Amazon Button V1 is present-->\n- <seeElement selector=\"{{AmazonButtonSection.v1MiniCart}}\" stepKey=\"seeEnabledAmazonButton\"/>\n- <dontSeeElement selector=\"{{AmazonButtonSection.v2MiniCart}}\" stepKey=\"dontSeeDisabledAmazonButton\"/>\n- </test>\n-</tests>\n" }, { "change_type": "DELETE", "old_path": "src/PayV2/Test/Mftf-24/Test/AmazonPaymentButtonV1Test.xml", "new_path": null, "diff": "-<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n-<tests xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"urn:magento:mftf:Test/etc/testSchema.xsd\">\n- <test name=\"AmazonPaymentButtonV1\">\n- <annotations>\n- <stories value=\"Amazon Button\"/>\n- <title value=\"Amazon Payment Button V1\"/>\n- <description value=\"Only Amazon Button V1 should be present in payment methods when enabled.\"/>\n- <severity value=\"CRITICAL\"/>\n- <group value=\"amazon_pay_v2\"/>\n- <group value=\"amazon_pay_v2_button\"/>\n- </annotations>\n-\n- <before>\n- <createData entity=\"SimpleTwo\" stepKey=\"createSimpleProduct\"/>\n- <createData entity=\"SampleAmazonPaymentV1Config\" stepKey=\"SampleAmazonPaymentV1ConfigData\"/>\n- <magentoCLI command=\"config:set {{AmazonButtonPaymentConfig.path}} 1\" stepKey=\"displayAmazonButtonPayment\"/>\n- <magentoCLI command=\"cache:flush\" stepKey=\"flushCache\"/>\n- </before>\n-\n- <!--Go to product page-->\n- <actionGroup ref=\"StorefrontOpenProductPageActionGroup\" stepKey=\"openProductStoreFront\">\n- <argument name=\"productUrl\" value=\"$$createSimpleProduct.custom_attributes[url_key]$$\"/>\n- </actionGroup>\n- <!--Click on Add To Cart button-->\n- <actionGroup ref=\"StorefrontAddToTheCartActionGroup\" stepKey=\"clickOnAddToCartButton\"/>\n- <!--Go to checkout-->\n- <actionGroup ref=\"GoToCheckoutFromMinicartActionGroup\" stepKey=\"goToCheckoutFromMiniCart\"/>\n- <!--Enter shipping information and continue to payments-->\n- <actionGroup ref=\"GuestCheckoutFillingShippingSectionActionGroup\" stepKey=\"guestCheckoutFillingShipping\">\n- <argument name=\"shippingMethod\" value=\"Flat Rate\"/>\n- </actionGroup>\n- <!--Verify only Amazon Payment Button V1 is present-->\n- <click selector=\"{{AmazonCheckoutSection.v1Method}}\" stepKey=\"selectEnabledAmazonPaymentMethod\"/>\n- <seeElement selector=\"{{AmazonButtonSection.v1Payment}}\" stepKey=\"seeEnabledAmazonButton\"/>\n- <dontSee selector=\"{{AmazonCheckoutSection.v2Method}}\" stepKey=\"dontSeeDisabledAmazonPaymentMethod\"/>\n- <dontSeeElement selector=\"{{AmazonButtonSection.v2Payment}}\" stepKey=\"dontSeeDisabledAmazonButton\"/>\n- </test>\n-</tests>\n" }, { "change_type": "DELETE", "old_path": "src/PayV2/Test/Mftf-24/Test/AmazonProductButtonV1Test.xml", "new_path": null, "diff": "-<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n-<tests xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"urn:magento:mftf:Test/etc/testSchema.xsd\">\n- <test name=\"AmazonProductButtonV1\">\n- <annotations>\n- <stories value=\"Amazon Button\"/>\n- <title value=\"Amazon Product Button V1\"/>\n- <description value=\"Only Amazon Button V1 should be present on product page when enabled.\"/>\n- <severity value=\"CRITICAL\"/>\n- <group value=\"amazon_pay_v2\"/>\n- <group value=\"amazon_pay_v2_button\"/>\n- </annotations>\n-\n- <before>\n- <createData entity=\"SimpleTwo\" stepKey=\"createSimpleProduct\"/>\n- <createData entity=\"SampleAmazonPaymentV1Config\" stepKey=\"SampleAmazonPaymentV1ConfigData\"/>\n- <magentoCLI command=\"config:set {{AmazonButtonProductConfig.path}} 1\" stepKey=\"displayAmazonButtonProduct\"/>\n- <magentoCLI command=\"cache:flush\" stepKey=\"flushCache\"/>\n- </before>\n-\n- <!--Go to product page-->\n- <actionGroup ref=\"StorefrontOpenProductPageActionGroup\" stepKey=\"openProductStoreFront\">\n- <argument name=\"productUrl\" value=\"$$createSimpleProduct.custom_attributes[url_key]$$\"/>\n- </actionGroup>\n- <!--Verify only Amazon Button V1 is present-->\n- <seeElement selector=\"{{AmazonButtonSection.v1Product}}\" stepKey=\"seeEnabledAmazonButton\"/>\n- <dontSeeElement selector=\"{{AmazonButtonSection.v2Product}}\" stepKey=\"dontSeeDisabledAmazonButton\"/>\n- </test>\n-</tests>\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
APF-273 - remove CV1 tests
21,241
17.12.2020 18:42:44
21,600
8fe6fafcd8c203f7958a426d69dbac60fc2ee19d
copy forward db tables from CV1
[ { "change_type": "MODIFY", "old_path": "src/PayV2/etc/db_schema.xml", "new_path": "src/PayV2/etc/db_schema.xml", "diff": "<index referenceId=\"AMAZON_PAYV2_ASYNC_IS_PENDING\" indexType=\"btree\">\n<column name=\"is_pending\"/>\n</index>\n+ <index referenceId=\"AMAZON_PAYV2_ASYNC_CUSTOMER_ID_AMAZON_ID\" indexType=\"btree\">\n+ <column name=\"is_pending\"/>\n+ </index>\n</table>\n<table name=\"amazon_payv2_checkout_session\" resource=\"default\" engine=\"innodb\" comment=\"Amazon PayV2 Checkout Session\">\n<column xsi:type=\"int\" name=\"id\" unsigned=\"true\" nullable=\"false\" identity=\"true\" comment=\"ID\"/>\n<column name=\"is_active\"/>\n</index>\n</table>\n+ <table name=\"amazon_customer\" resource=\"default\" engine=\"innodb\" comment=\"Amazon PayV2 Customer Link\">\n+ <column xsi:type=\"int\" name=\"entity_id\" padding=\"10\" unsigned=\"true\" nullable=\"false\" identity=\"true\" comment=\"Entity_id\"/>\n+ <column xsi:type=\"int\" name=\"customer_id\" padding=\"10\" unsigned=\"true\" nullable=\"false\" identity=\"false\" comment=\"Customer_id\"/>\n+ <column xsi:type=\"varchar\" name=\"amazon_id\" nullable=\"false\" length=\"255\" comment=\"Amazon_id\"/>\n+ <constraint xsi:type=\"primary\" referenceId=\"PRIMARY\">\n+ <column name=\"entity_id\"/>\n+ </constraint>\n+ <constraint xsi:type=\"unique\" referenceId=\"AMAZON_CUSTOMER_CUSTOMER_ID_AMAZON_ID\">\n+ <column name=\"customer_id\"/>\n+ <column name=\"amazon_id\"/>\n+ </constraint>\n+ <constraint xsi:type=\"unique\" referenceId=\"AMAZON_CUSTOMER_CUSTOMER_ID\">\n+ <column name=\"customer_id\"/>\n+ </constraint>\n+ <constraint xsi:type=\"foreign\" referenceId=\"AMAZON_CUSTOMER_CUSTOMER_ID_CUSTOMER_ENTITY_ENTITY_ID\" table=\"amazon_customer\" column=\"customer_id\" referenceTable=\"customer_entity\" referenceColumn=\"entity_id\" onDelete=\"CASCADE\"/>\n+ </table>\n</schema>\n" }, { "change_type": "ADD", "old_path": null, "new_path": "src/PayV2/etc/extension_attributes.xml", "diff": "+<?xml version=\"1.0\"?>\n+<!--\n+/**\n+ * Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\").\n+ * You may not use this file except in compliance with the License.\n+ * A copy of the License is located at\n+ *\n+ * http://aws.amazon.com/apache2.0\n+ *\n+ * or in the \"license\" file accompanying this file. This file is distributed\n+ * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n+ * express or implied. See the License for the specific language governing\n+ * permissions and limitations under the License.\n+ */\n+-->\n+<config xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"urn:magento:framework:Api/etc/extension_attributes.xsd\">\n+ <extension_attributes for=\"Magento\\Customer\\Api\\Data\\CustomerInterface\">\n+ <attribute code=\"amazon_id\" type=\"string\">\n+ <join reference_table=\"amazon_customer\" reference_field=\"customer_id\" join_on_field=\"entity_id\">\n+ <field>amazon_id</field>\n+ </join>\n+ </attribute>\n+ </extension_attributes>\n+</config>\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
APF-271 - copy forward db tables from CV1
21,241
17.12.2020 18:43:17
21,600
108578099f5ee3712842fcf5ee89ba23f952f9ae
copy forward a translation needed for tests to pass, rest will come with
[ { "change_type": "MODIFY", "old_path": "src/PayV2/i18n/en_US.csv", "new_path": "src/PayV2/i18n/en_US.csv", "diff": "\"This transaction was cancelled. Please try again.\",\"The transaction has been canceled, please try again.\"\n\"This transaction was declined. Please try again using a different payment method.\",\"The transaction has been declined, please try to use another payment method.\"\n\"or continue with Standard Checkout\",\"or continue with Standard Checkout\"\n+\"A shop account for this email address already exists. Please enter your shop accounts password to log in without leaving the shop.\",\"A store account for this email address already exists. Please enter your store account password to log in without leaving the store.\"\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
APF-273 - copy forward a translation needed for tests to pass, rest will come with APF-272
21,241
22.12.2020 12:20:57
21,600
072ea775632f98a5c0f55a4788319cf95be47209
ignore remaining phpcs warnings for now
[ { "change_type": "MODIFY", "old_path": "src/PayV2/Block/Adminhtml/System/Config/Form/DeveloperLogs.php", "new_path": "src/PayV2/Block/Adminhtml/System/Config/Form/DeveloperLogs.php", "diff": "@@ -129,6 +129,7 @@ class DeveloperLogs extends \\Magento\\Config\\Block\\System\\Config\\Form\\Field\n$links = [];\n$root = $this->directoryList->getPath(DirectoryList::ROOT);\nforeach (self::LOGS as $name => $data) {\n+ // phpcs:ignore Magento2.Functions.DiscouragedFunction\nif (file_exists($root . $data['path'])) {\n$links[] = [\n'name' => $data['name'],\n" }, { "change_type": "MODIFY", "old_path": "src/PayV2/Block/Adminhtml/System/Config/Form/RestrictCategories.php", "new_path": "src/PayV2/Block/Adminhtml/System/Config/Form/RestrictCategories.php", "diff": "@@ -40,6 +40,7 @@ class RestrictCategories extends \\Magento\\Config\\Block\\System\\Config\\Form\\Field\n*/\nprotected function _getElementData(\\Magento\\Framework\\Data\\Form\\Element\\AbstractElement $element)\n{\n+ // phpcs:ignore Magento2.Functions.DiscouragedFunction\nparse_str($element->getName(), $result);\n$data = &$result;\nwhile (is_array($data)) {\n@@ -58,6 +59,7 @@ class RestrictCategories extends \\Magento\\Config\\Block\\System\\Config\\Form\\Field\n*/\nprotected function _getElementDataScope(\\Magento\\Framework\\Data\\Form\\Element\\AbstractElement $element)\n{\n+ // phpcs:ignore Magento2.Functions.DiscouragedFunction\nparse_str($element->getName(), $data);\n$scopes = [];\nwhile (is_array($data)) {\n" }, { "change_type": "MODIFY", "old_path": "src/PayV2/Client/Client.php", "new_path": "src/PayV2/Client/Client.php", "diff": "@@ -19,13 +19,5 @@ use Amazon\\Pay\\API\\Client as AmazonClient;\nclass Client extends AmazonClient\n{\n- /**\n- * Client constructor\n- *\n- * @param array $amazonConfig\n- */\n- public function __construct(array $amazonConfig)\n- {\n- parent::__construct($amazonConfig);\n- }\n+ // Only wrap the sdk class for easy access\n}\n" }, { "change_type": "MODIFY", "old_path": "src/PayV2/Controller/Adminhtml/PayV2/DownloadLog.php", "new_path": "src/PayV2/Controller/Adminhtml/PayV2/DownloadLog.php", "diff": "@@ -53,6 +53,7 @@ class DownloadLog extends \\Magento\\Backend\\Controller\\Adminhtml\\System\nif (!isset($logs[$log])) {\nthrow new NotFoundException('Log \"' . $log . '\" does not exist');\n}\n+ // phpcs:ignore Magento2.Functions.DiscouragedFunction\nreturn $this->fileFactory->create(basename($logs[$log]['path']), [\n'type' => 'filename',\n'value' => $logs[$log]['path']\n" }, { "change_type": "MODIFY", "old_path": "src/PayV2/Controller/Payment/Ipn.php", "new_path": "src/PayV2/Controller/Payment/Ipn.php", "diff": "@@ -95,6 +95,7 @@ class Ipn extends \\Magento\\Framework\\App\\Action\\Action\ntry {\nif ($this->amazonConfig->isLoggingEnabled()) {\n+ // phpcs:ignore Magento2.Functions.DiscouragedFunction\n$this->ipnLogger->info(print_r($this->getRequest()->getHeaders()->toArray(), 1));\n$this->ipnLogger->info($this->getRequest()->getContent());\n}\n" }, { "change_type": "MODIFY", "old_path": "src/PayV2/Helper/Data.php", "new_path": "src/PayV2/Helper/Data.php", "diff": "@@ -108,6 +108,7 @@ class Data extends AbstractHelper\n$restrictedCategoryIds = [];\nforeach ($this->amazonConfig->getRestrictedCategoryIds() as $restrictedCategoryId) {\nif (!in_array($restrictedCategoryId, $restrictedCategoryIds)) {\n+ // phpcs:ignore Magento2.Performance.ForeachArrayMerge\n$restrictedCategoryIds = array_merge(\n$restrictedCategoryIds,\n$this->fetchRestrictedCategoryIds($restrictedCategoryId)\n" }, { "change_type": "MODIFY", "old_path": "src/PayV2/Model/Alexa.php", "new_path": "src/PayV2/Model/Alexa.php", "diff": "@@ -86,6 +86,7 @@ class Alexa\nprotected function apiCall($storeId, $method, $arguments)\n{\n$client = $this->clientFactory->create($storeId, ScopeInterface::SCOPE_STORE);\n+ // phpcs:ignore Magento2.Functions.DiscouragedFunction\n$data = call_user_func_array([$client, $method], $arguments);\n$status = $data['status'];\n$response = json_decode($data['response'], true);\n@@ -146,11 +147,13 @@ class Alexa\n$cacheKey = hash('sha256', __METHOD__);\n$result = $this->cache->load($cacheKey);\nif ($result) {\n+ // phpcs:ignore Magento2.Functions.DiscouragedFunction\n$result = \\Magento\\Framework\\Serialize\\SerializerInterface::unserialize(gzuncompress($result));\n}\nif (!$result) {\n$result = $this->fetchDeliveryCarriers();\n$this->cache->save(\n+ // phpcs:ignore Magento2.Functions.DiscouragedFunction\ngzcompress(\\Magento\\Framework\\Serialize\\SerializerInterface::serialize($result)),\n$cacheKey\n);\n" }, { "change_type": "MODIFY", "old_path": "src/PayV2/Model/AmazonConfig.php", "new_path": "src/PayV2/Model/AmazonConfig.php", "diff": "@@ -152,6 +152,7 @@ class AmazonConfig\npublic function getLanguage($scope = ScopeInterface::SCOPE_STORE, $scopeCode = null)\n{\n$paymentRegion = $this->getRegion($scope, $scopeCode);\n+ // phpcs:ignore Generic.PHP.NoSilencedErrors\n@list($lang, $region) = explode('_', $this->localeResolver->getLocale());\nswitch ($lang) {\ncase 'de':\n" }, { "change_type": "MODIFY", "old_path": "src/PayV2/Model/CheckoutSessionManagement.php", "new_path": "src/PayV2/Model/CheckoutSessionManagement.php", "diff": "@@ -284,6 +284,7 @@ class CheckoutSessionManagement implements \\Amazon\\PayV2\\Api\\CheckoutSessionMana\nif ($this->isAvailable($cartId)) {\n$session = $this->getAmazonSession($cartId);\n+ // phpcs:ignore Magento2.Functions.DiscouragedFunction\n$addressData = call_user_func($addressDataExtractor, $session);\nif (!empty($addressData)) {\n$addressData['state'] = $addressData['stateOrRegion'];\n" }, { "change_type": "MODIFY", "old_path": "src/PayV2/view/frontend/templates/login.phtml", "new_path": "src/PayV2/view/frontend/templates/login.phtml", "diff": "@@ -39,6 +39,7 @@ $amazonPublicKeyId = $block->getAmazonPublicKeyId();\n<div id=\"AmazonPayButton\"\nclass=\"login-with-amazon\"\ndata-mage-init='{\"amazonPayV2LoginButton\": {\"payload\":\n+ <?php // phpcs:ignore Magento2.Functions.DiscouragedFunction ?>\n\"<?= $block->escapeHtml(addslashes($buttonPayload)) ?>\",\n\"signature\": \"<?= $block->escapeHtml($buttonSignature) ?>\",\n\"public_key_id\": \"<?= $block->escapeHtml($amazonPublicKeyId) ?>\" }}'>\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
APF-272 - ignore remaining phpcs warnings for now
21,241
22.12.2020 12:22:04
21,600
5db5f759e16573f3b1f7aeec152dba1fcd63d497
copy styling required for PDP button to function from CV1
[ { "change_type": "MODIFY", "old_path": "src/PayV2/view/frontend/web/css/source/_module.less", "new_path": "src/PayV2/view/frontend/web/css/source/_module.less", "diff": "margin-top: 20px;\n}\n}\n+\n+ .amazon-divider {\n+ border-bottom: 1px solid #cccccc;\n+ line-height: 0.1em;\n+ margin: 18px 0 20px;\n+ text-align: center;\n+ max-width: 500px;\n+ span {\n+ background: #fff;\n+ padding:0 5px;\n+ }\n+ }\n+\n+ /** mini cart styling **/\n+ .product-social-links,\n+ .amazon-minicart-container {\n+ width: 100%;\n+ display: block;\n+ text-align: center;\n+ .amazon-button-container {\n+ display: inline-block;\n+ margin: 0px;\n+ }\n+ .field-tooltip {\n+ .field-tooltip-content {\n+ top: 38px;\n+ left: -245px;\n+\n+ &:before {\n+ border: none;\n+ border-left: 10px solid transparent;\n+ border-right: 10px solid transparent;\n+ border-bottom: 10px solid #666666;\n+ top: -10px;\n+ left: 244px;\n+ }\n+ &:after {\n+ border: none;\n+ border-left: 10px solid transparent;\n+ border-right: 10px solid transparent;\n+ border-bottom: 10px solid #f4f4f4;\n+ top: -8px;\n+ left: 244px;\n+ }\n+ }\n+ }\n+ }\n+ .product-social-links {\n+ .amazon-button-container {\n+ margin-bottom: 30px;\n+ display: block;\n+ }\n+ }\n+ .amazon-checkout-now {\n+ border-top: 1px solid #c1c1c1;\n+ padding-top: 10px;\n+ margin-bottom: 10px;\n+ }\n+ .amazon-addtoCart {\n+ display: block;\n+ width: 100%;\n+ height: 100%;\n+ position: absolute;\n+ left: 0;\n+ top: 0;\n+ }\n+\n+ .revert-checkout {\n+ margin-top: 20px;\n+ margin-bottom: 20px;\n+ display: block;\n+ }\n+\n+ .centered-button {\n+ text-align: center;\n+ display: inline-block;\n+ .catalog-product-view & {\n+ display: table;\n+ }\n+ }\n+\n+ .checkout-payment-method {\n+ .amazon-sandbox-simulator {\n+ .lib-css(border-bottom, @checkout-payment-option-title__border);\n+\n+ .payment-option-title {\n+ border-top: none;\n+ padding-top: 0;\n+ }\n+\n+ .amazon-sandbox-simulator-scenario {\n+ margin-bottom: 10px;\n+ }\n+ }\n+ }\n+\n+ .checkout-methods-items {\n+ .amazon-minicart-container {\n+ .amazon-divider {\n+ display: none;\n+ }\n+ }\n+ .centered-button {\n+ margin-bottom: 0;\n+\n+ @media all and (max-width: @screen__m) {\n+ width: auto;\n+ }\n+ }\n+\n+ .field-tooltip {\n+ display: none;\n+\n+ .field-tooltip-content {\n+ @abs-checkout-tooltip-content-position-top();\n+\n+ @media all and (max-width: @screen__m) {\n+\n+ @right-shift: 56px;\n+ right: -@right-shift;\n+ top: 38px;\n+ left: auto;\n+\n+ &:before,\n+ &:after {\n+ right: @right-shift;\n+ }\n+ }\n+ }\n+ }\n+ }\n+\n+ .amazon-widget {\n+ max-width: 400px;\n+ height: 228px;\n+ }\n+\n+ .amazon-widget--address {\n+ margin-top: 20px;\n+ }\n+\n+ .amazon-addresses {\n+ margin-top: 20px;\n+ .amazon-address {\n+ margin-bottom: 20px;\n+ }\n+ }\n+\n+ #checkout-step-shipping {\n+ .amazon-divider {\n+ margin: 40px 0;\n+ }\n+ }\n+\n+ .checkout-payment-method {\n+ .amazon-payment-method {\n+ .payment-method-title {\n+ visibility: hidden; //hide the title for Amazon Pay methods only\n+ padding-bottom: 0;\n+ }\n+ }\n+ }\n+\n+ /** Prevent movement after a soft decline to other payment steps **/\n+ .opc-progress-bar-item._complete.lock-step {\n+ cursor: none;\n+ pointer-events: none;\n+ }\n+}\n+\n+@media all and (max-width: @screen__m) {\n+ .amazon-minicart-container {\n+ .amazon-button-container {\n+ width: auto;\n+ }\n+ }\n+}\n+\n+.media-width(@extremum, @break) when (@extremum = 'max') and (@break = @screen__s) {\n+ .checkout-payment-method {\n+ .amazon-sandbox-simulator {\n+ .lib-css(border-top, @checkout-payment-option-title__border);\n+ }\n+ }\n+}\n+\n+.media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__m) {\n+ .amazon-addresses {\n+ &:extend(.abs-add-clearfix-desktop all);\n+ .amazon-address {\n+ &:extend(.abs-blocks-2columns all);\n+ margin-bottom: 0;\n+ }\n+ }\n}\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
APF-273 - copy styling required for PDP button to function from CV1
21,241
23.12.2020 10:20:17
21,600
f5df374a69603279a67e10d179673f1be3c35262
update for library class wrapper
[ { "change_type": "MODIFY", "old_path": "src/PayV2/Client/Client.php", "new_path": "src/PayV2/Client/Client.php", "diff": "* express or implied. See the License for the specific language governing\n* permissions and limitations under the License.\n*/\n+\n+// @codingStandardsIgnoreFile\n+\nnamespace Amazon\\PayV2\\Client;\nuse Amazon\\Pay\\API\\Client as AmazonClient;\nclass Client extends AmazonClient\n{\n- // Only wrap the sdk class for easy access\n+ /**\n+ * Client constructor\n+ *\n+ * @param array $amazonConfig\n+ */\n+ public function __construct(array $amazonConfig)\n+ {\n+ parent::__construct($amazonConfig);\n+ }\n}\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
APF-272 - update for library class wrapper
21,241
23.12.2020 14:36:14
21,600
bf95431854ea45f4ce46e8696566db6c6ee6f720
ensure we are using the correct config data
[ { "change_type": "MODIFY", "old_path": "src/PayV2/view/frontend/web/js/amazon-button.js", "new_path": "src/PayV2/view/frontend/web/js/amazon-button.js", "diff": "@@ -110,12 +110,15 @@ define([\n**/\n_redraw: function () {\nvar self = this;\n+\n+ amazonCheckout.withAmazonCheckout(function (amazon, args) {\nvar cartData = customerData.get('cart');\ncartData.subscribe(function (updatedCart) {\nif (!$(self.options.hideIfUnavailable).first().is(':visible')) {\nself._draw();\n}\n});\n+ });\n},\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
APF-286 - ensure we are using the correct config data
21,270
22.12.2020 17:05:40
28,800
0bb644cf541e9c65134ebc8ac5aea020c3e931f5
wip of removing createcheckoutsession
[ { "change_type": "MODIFY", "old_path": "src/PayV2/Api/CheckoutSessionManagementInterface.php", "new_path": "src/PayV2/Api/CheckoutSessionManagementInterface.php", "diff": "@@ -28,9 +28,10 @@ interface CheckoutSessionManagementInterface\n/**\n* @param mixed $cartId\n+ * @param mixed $checkoutSessionId\n* @return mixed\n*/\n- public function createCheckoutSession($cartId);\n+ public function storeCheckoutSession($cartId, $checkoutSessionId);\n/**\n* @param mixed $cartId\n" }, { "change_type": "MODIFY", "old_path": "src/PayV2/Controller/Login.php", "new_path": "src/PayV2/Controller/Login.php", "diff": "*/\nnamespace Amazon\\PayV2\\Controller;\n+use Amazon\\PayV2\\Api\\CheckoutSessionManagementInterface;\nuse Amazon\\PayV2\\Client\\ClientFactoryInterface;\nuse Amazon\\PayV2\\Api\\Data\\AmazonCustomerInterface;\nuse Amazon\\PayV2\\Domain\\AmazonCustomerFactory;\n@@ -109,6 +110,8 @@ abstract class Login extends Action\n*/\nprotected $accountManagement;\n+ protected $checkoutSessionManagement;\n+\n/**\n* Login constructor.\n* @param Context $context\n@@ -143,7 +146,8 @@ abstract class Login extends Action\nLoggerInterface $logger,\nStoreManager $storeManager,\nUrlInterface $url,\n- AccountManagementInterface $accountManagement\n+ AccountManagementInterface $accountManagement,\n+ CheckoutSessionManagementInterface $checkoutSessionManagement\n) {\n$this->amazonCustomerFactory = $amazonCustomerFactory;\n$this->amazonAdapter = $amazonAdapter;\n@@ -159,6 +163,7 @@ abstract class Login extends Action\n$this->storeManager = $storeManager;\n$this->url = $url;\n$this->accountManagement = $accountManagement;\n+ $this->checkoutSessionManagement = $checkoutSessionManagement;\nparent::__construct($context);\n}\n" }, { "change_type": "MODIFY", "old_path": "src/PayV2/Controller/Login/Checkout.php", "new_path": "src/PayV2/Controller/Login/Checkout.php", "diff": "@@ -35,6 +35,8 @@ class Checkout extends \\Amazon\\PayV2\\Controller\\Login\n$checkoutSessionId\n);\n+ $this->checkoutSessionManagement->storeCheckoutSession($this->session->getQuote()->getId(), $checkoutSessionId);\n+\nif (!$this->amazonConfig->isLwaEnabled()) {\n$userInfo = $checkoutSession['buyer'];\nif ($userInfo && isset($userInfo['email'])) {\n" }, { "change_type": "MODIFY", "old_path": "src/PayV2/Model/CheckoutSessionManagement.php", "new_path": "src/PayV2/Model/CheckoutSessionManagement.php", "diff": "@@ -338,6 +338,19 @@ class CheckoutSessionManagement implements \\Amazon\\PayV2\\Api\\CheckoutSessionMana\nif ($this->isAvailable($cartId)) {\n$buttonPayload = $this->amazonAdapter->generateButtonPayload();\n+ $buttonPayload = [\n+ 'webCheckoutDetails' => [\n+ 'checkoutReviewReturnUrl' => $this->amazonConfig->getCheckoutReviewUrl(),\n+ ],\n+ 'storeId' => $this->amazonConfig->getClientId(),\n+ ];\n+ if ($deliverySpecs = $this->amazonConfig->getDeliverySpecifications()) {\n+ $buttonPayload['deliverySpecifications'] = $deliverySpecs;\n+ }\n+ // todo use magento method\n+ $buttonPayload = json_encode($buttonPayload, JSON_UNESCAPED_SLASHES);\n+\n+\n$result = [\n'merchant_id' => $this->amazonConfig->getMerchantId(),\n'currency' => $this->amazonConfig->getCurrencyCode(),\n@@ -356,21 +369,21 @@ class CheckoutSessionManagement implements \\Amazon\\PayV2\\Api\\CheckoutSessionMana\n/**\n* {@inheritdoc}\n*/\n- public function createCheckoutSession($cartId)\n+ public function storeCheckoutSession($cartId, $checkoutSessionId)\n{\n$result = [];\n$this->cancelCheckoutSession($cartId);\nif ($this->isAvailable($cartId)) {\n- $result = $this->amazonAdapter->createCheckoutSession($this->storeManager->getStore()->getId());\n- if (isset($result['checkoutSessionId'])) {\n+// $result = $this->amazonAdapter->createCheckoutSession($this->storeManager->getStore()->getId());\n+// if (isset($result['checkoutSessionId'])) {\n$checkoutSession = $this->checkoutSessionFactory->create([\n'data' => [\nCheckoutSessionInterface::KEY_QUOTE_ID => $this->getCart($cartId)->getId(),\n- CheckoutSessionInterface::KEY_SESSION_ID => $result['checkoutSessionId'],\n+ CheckoutSessionInterface::KEY_SESSION_ID => $checkoutSessionId,\n]\n]);\n$this->checkoutSessionRepository->save($checkoutSession);\n- }\n+// }\n}\nreturn $result;\n}\n" }, { "change_type": "MODIFY", "old_path": "src/PayV2/view/frontend/web/js/amazon-button.js", "new_path": "src/PayV2/view/frontend/web/js/amazon-button.js", "diff": "@@ -44,16 +44,21 @@ define([\nif (!$.isEmptyObject(checkoutSessionConfig)) {\ncallback({\nmerchantId: checkoutSessionConfig['merchant_id'],\n- createCheckoutSession: {\n- url: url.build('amazon_payv2/checkout/createSession'),\n- method: 'PUT'\n- },\n+ // createCheckoutSession: {\n+ // url: url.build('amazon_payv2/checkout/createSession'),\n+ // method: 'PUT'\n+ // },\nledgerCurrency: checkoutSessionConfig['currency'],\n- buttonColor: checkoutSessionConfig['button_color'],\n+ sandbox: checkoutSessionConfig['sandbox'],\ncheckoutLanguage: checkoutSessionConfig['language'],\nproductType: this._isPayOnly(checkoutSessionConfig['pay_only']) ? 'PayOnly' : 'PayAndShip',\nplacement: this.options.placement,\n- sandbox: checkoutSessionConfig['sandbox'],\n+ buttonColor: checkoutSessionConfig['button_color'],\n+ createCheckoutSessionConfig: {\n+ payloadJSON: checkoutSessionConfig['payload'],\n+ signature: checkoutSessionConfig['signature'],\n+ publicKeyId: checkoutSessionConfig['public_key_id'],\n+ }\n});\nif (this.options.placement !== \"Checkout\") {\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
APF-294 wip of removing createcheckoutsession
21,270
23.12.2020 15:27:13
28,800
47ab3ee07fe231af1917e2a10ba10a297233b23f
finishing touches for both login and checkout buttons
[ { "change_type": "MODIFY", "old_path": "src/PayV2/Block/Login.php", "new_path": "src/PayV2/Block/Login.php", "diff": "namespace Amazon\\PayV2\\Block;\nuse Amazon\\PayV2\\Model\\AmazonConfig;\n-use Amazon\\PayV2\\Model\\Adapter\\AmazonPayV2Adapter;\n-use Amazon\\Pay\\API\\Client;\nuse Magento\\Framework\\View\\Element\\Template;\nuse Magento\\Framework\\View\\Element\\Template\\Context;\n@@ -31,24 +29,16 @@ class Login extends Template\n*/\nprivate $amazonConfig;\n- /**\n- * @var AmazonPayV2Adapter\n- */\n- private $amazonAdapter;\n-\n/**\n* Login constructor.\n* @param Context $context\n* @param AmazonConfig $amazonConfig\n- * @param Client $amazonClient\n*/\npublic function __construct(\nContext $context,\n- AmazonConfig $amazonConfig,\n- AmazonPayV2Adapter $amazonAdapter\n+ AmazonConfig $amazonConfig\n) {\n$this->amazonConfig = $amazonConfig;\n- $this->amazonAdapter = $amazonAdapter;\nparent::__construct($context);\n}\n@@ -63,19 +53,4 @@ class Login extends Template\nreturn parent::_toHtml();\n}\n-\n- public function getAmazonLoginPayload()\n- {\n- return $this->amazonAdapter->generateButtonPayload();\n- }\n-\n- public function getAmazonLoginSignature($payload)\n- {\n- return $this->amazonAdapter->signButton($payload);\n- }\n-\n- public function getAmazonPublicKeyId()\n- {\n- return $this->amazonConfig->getPublicKeyId();\n- }\n}\n" }, { "change_type": "MODIFY", "old_path": "src/PayV2/CustomerData/CheckoutSession.php", "new_path": "src/PayV2/CustomerData/CheckoutSession.php", "diff": "@@ -74,12 +74,4 @@ class CheckoutSession\n{\nreturn $this->checkoutSessionManagement->completeCheckoutSession($this->session->getQuote());\n}\n-\n- /**\n- * Create Amazon Checkout Session\n- */\n- public function createCheckoutSession()\n- {\n- return $this->checkoutSessionManagement->createCheckoutSession($this->session->getQuote());\n- }\n}\n" }, { "change_type": "MODIFY", "old_path": "src/PayV2/Model/Adapter/AmazonPayV2Adapter.php", "new_path": "src/PayV2/Model/Adapter/AmazonPayV2Adapter.php", "diff": "@@ -114,33 +114,6 @@ class AmazonPayV2Adapter\n];\n}\n- /**\n- * Create new Amazon Checkout Session\n- *\n- * @param $storeId\n- * @return mixed\n- */\n- public function createCheckoutSession($storeId)\n- {\n- $headers = $this->getIdempotencyHeader();\n-\n- $payload = [\n- 'webCheckoutDetails' => [\n- 'checkoutReviewReturnUrl' => $this->amazonConfig->getCheckoutReviewUrl(),\n- ],\n- 'storeId' => $this->amazonConfig->getClientId(),\n- 'platformId' => $this->amazonConfig->getPlatformId(),\n- ];\n- $deliverySpecifications = $this->amazonConfig->getDeliverySpecifications();\n- if (!empty($deliverySpecifications)) {\n- $payload['deliverySpecifications'] = $deliverySpecifications;\n- }\n-\n- $response = $this->clientFactory->create($storeId)->createCheckoutSession($payload, $headers);\n-\n- return $this->processResponse($response, __FUNCTION__);\n- }\n-\n/**\n* Return checkout session details\n*\n@@ -456,13 +429,11 @@ class AmazonPayV2Adapter\n}\n/**\n- * Generate static signature for amazon.Pay.renderButton used by checkout.js\n+ * Generate login static signature for amazon.Pay.renderButton used by checkout.js\n*\n- * @param array $payload\n- * @param null|int|string $storeId\n* @return string\n*/\n- public function generateButtonPayload()\n+ public function generateLoginButtonPayload()\n{\n$payload = [\n'signInReturnUrl' => $this->url->getRouteUrl('amazon_payv2/login/authorize/'),\n@@ -473,6 +444,27 @@ class AmazonPayV2Adapter\nreturn json_encode($payload, JSON_UNESCAPED_SLASHES);\n}\n+ /**\n+ * Generate checkout static signature for amazon.Pay.renderButton used by checkout.js\n+ *\n+ * @return string\n+ */\n+ public function generateCheckoutButtonPayload()\n+ {\n+ $payload = [\n+ 'webCheckoutDetails' => [\n+ 'checkoutReviewReturnUrl' => $this->amazonConfig->getCheckoutReviewUrl(),\n+ ],\n+ 'storeId' => $this->amazonConfig->getClientId(),\n+ ];\n+\n+ if ($deliverySpecs = $this->amazonConfig->getDeliverySpecifications()) {\n+ $payload['deliverySpecifications'] = $deliverySpecs;\n+ }\n+\n+ return json_encode($payload, JSON_UNESCAPED_SLASHES);\n+ }\n+\npublic function signButton($payload, $storeId = null)\n{\nreturn $this->clientFactory->create($storeId)->generateButtonSignature($payload);\n" }, { "change_type": "MODIFY", "old_path": "src/PayV2/Model/CheckoutSessionManagement.php", "new_path": "src/PayV2/Model/CheckoutSessionManagement.php", "diff": "@@ -336,20 +336,8 @@ class CheckoutSessionManagement implements \\Amazon\\PayV2\\Api\\CheckoutSessionMana\n{\n$result = [];\nif ($this->isAvailable($cartId)) {\n- $buttonPayload = $this->amazonAdapter->generateButtonPayload();\n-\n- $buttonPayload = [\n- 'webCheckoutDetails' => [\n- 'checkoutReviewReturnUrl' => $this->amazonConfig->getCheckoutReviewUrl(),\n- ],\n- 'storeId' => $this->amazonConfig->getClientId(),\n- ];\n- if ($deliverySpecs = $this->amazonConfig->getDeliverySpecifications()) {\n- $buttonPayload['deliverySpecifications'] = $deliverySpecs;\n- }\n- // todo use magento method\n- $buttonPayload = json_encode($buttonPayload, JSON_UNESCAPED_SLASHES);\n-\n+ $loginButtonPayload = $this->amazonAdapter->generateLoginButtonPayload();\n+ $checkoutButtonPayload = $this->amazonAdapter->generateCheckoutButtonPayload();\n$result = [\n'merchant_id' => $this->amazonConfig->getMerchantId(),\n@@ -358,8 +346,10 @@ class CheckoutSessionManagement implements \\Amazon\\PayV2\\Api\\CheckoutSessionMana\n'language' => $this->amazonConfig->getLanguage(),\n'pay_only' => $this->amazonHelper->isPayOnly($this->getCart($cartId)),\n'sandbox' => $this->amazonConfig->isSandboxEnabled(),\n- 'payload' => $buttonPayload,\n- 'signature' => $this->amazonAdapter->signButton($buttonPayload),\n+ 'login_payload' => $loginButtonPayload,\n+ 'login_signature' => $this->amazonAdapter->signButton($loginButtonPayload),\n+ 'checkout_payload' => $checkoutButtonPayload,\n+ 'checkout_signature' => $this->amazonAdapter->signButton($checkoutButtonPayload),\n'public_key_id' => $this->amazonConfig->getPublicKeyId(),\n];\n}\n@@ -373,9 +363,7 @@ class CheckoutSessionManagement implements \\Amazon\\PayV2\\Api\\CheckoutSessionMana\n{\n$result = [];\n$this->cancelCheckoutSession($cartId);\n- if ($this->isAvailable($cartId)) {\n-// $result = $this->amazonAdapter->createCheckoutSession($this->storeManager->getStore()->getId());\n-// if (isset($result['checkoutSessionId'])) {\n+ if ($this->isAvailable($cartId) && $checkoutSessionId) {\n$checkoutSession = $this->checkoutSessionFactory->create([\n'data' => [\nCheckoutSessionInterface::KEY_QUOTE_ID => $this->getCart($cartId)->getId(),\n@@ -383,7 +371,6 @@ class CheckoutSessionManagement implements \\Amazon\\PayV2\\Api\\CheckoutSessionMana\n]\n]);\n$this->checkoutSessionRepository->save($checkoutSession);\n-// }\n}\nreturn $result;\n}\n" }, { "change_type": "MODIFY", "old_path": "src/PayV2/etc/webapi.xml", "new_path": "src/PayV2/etc/webapi.xml", "diff": "<resource ref=\"anonymous\" />\n</resources>\n</route>\n- <route url=\"/V1/amazon-v2-checkout-session/:cartId\" method=\"POST\">\n- <service class=\"Amazon\\PayV2\\Api\\CheckoutSessionManagementInterface\" method=\"createCheckoutSession\"/>\n- <resources>\n- <resource ref=\"anonymous\" />\n- </resources>\n- </route>\n<route url=\"/V1/amazon-v2-checkout-session/:cartId/cancel\" method=\"POST\">\n<service class=\"Amazon\\PayV2\\Api\\CheckoutSessionManagementInterface\" method=\"cancelCheckoutSession\"/>\n<resources>\n" }, { "change_type": "MODIFY", "old_path": "src/PayV2/view/frontend/templates/login.phtml", "new_path": "src/PayV2/view/frontend/templates/login.phtml", "diff": "*/\n?>\n<?php /** @var \\Amazon\\PayV2\\Block\\Login $block */?>\n-<?php\n-\n-$buttonPayload = $block->getAmazonLoginPayload();\n-$buttonSignature = $block->getAmazonLoginSignature($buttonPayload);\n-$amazonPublicKeyId = $block->getAmazonPublicKeyId();\n-\n-?>\n<div class=\"block block-amazon-login\">\n<div class=\"block-title\">\n<strong id=\"block-amazon-login-heading\" role=\"heading\" aria-level=\"2\">\n@@ -38,11 +31,7 @@ $amazonPublicKeyId = $block->getAmazonPublicKeyId();\n<div class=\"amazon-button-container__cell\">\n<div id=\"AmazonPayButton\"\nclass=\"login-with-amazon\"\n- data-mage-init='{\"amazonPayV2LoginButton\": {\"payload\":\n- <?php // phpcs:ignore Magento2.Functions.DiscouragedFunction ?>\n- \"<?= $block->escapeHtml(addslashes($buttonPayload)) ?>\",\n- \"signature\": \"<?= $block->escapeHtml($buttonSignature) ?>\",\n- \"public_key_id\": \"<?= $block->escapeHtml($amazonPublicKeyId) ?>\" }}'>\n+ data-mage-init='{\"amazonPayV2LoginButton\": {}}'>\n</div>\n</div>\n<div class=\"amazon-button-container__cell\">\n" }, { "change_type": "MODIFY", "old_path": "src/PayV2/view/frontend/web/js/amazon-button.js", "new_path": "src/PayV2/view/frontend/web/js/amazon-button.js", "diff": "@@ -44,10 +44,6 @@ define([\nif (!$.isEmptyObject(checkoutSessionConfig)) {\ncallback({\nmerchantId: checkoutSessionConfig['merchant_id'],\n- // createCheckoutSession: {\n- // url: url.build('amazon_payv2/checkout/createSession'),\n- // method: 'PUT'\n- // },\nledgerCurrency: checkoutSessionConfig['currency'],\nsandbox: checkoutSessionConfig['sandbox'],\ncheckoutLanguage: checkoutSessionConfig['language'],\n@@ -55,8 +51,8 @@ define([\nplacement: this.options.placement,\nbuttonColor: checkoutSessionConfig['button_color'],\ncreateCheckoutSessionConfig: {\n- payloadJSON: checkoutSessionConfig['payload'],\n- signature: checkoutSessionConfig['signature'],\n+ payloadJSON: checkoutSessionConfig['checkout_payload'],\n+ signature: checkoutSessionConfig['checkout_signature'],\npublicKeyId: checkoutSessionConfig['public_key_id'],\n}\n});\n" }, { "change_type": "MODIFY", "old_path": "src/PayV2/view/frontend/web/js/amazon-login-button.js", "new_path": "src/PayV2/view/frontend/web/js/amazon-login-button.js", "diff": "@@ -40,8 +40,8 @@ define([\nsandbox: checkoutSessionConfig['sandbox'],\n// configure sign in\nsignInConfig: {\n- payloadJSON: checkoutSessionConfig['payload'],\n- signature: checkoutSessionConfig['signature'],\n+ payloadJSON: checkoutSessionConfig['login_payload'],\n+ signature: checkoutSessionConfig['login_signature'],\npublicKeyId: checkoutSessionConfig['public_key_id']\n}\n});\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
APF-294 finishing touches for both login and checkout buttons
21,241
07.01.2021 14:24:17
21,600
4f7fcdf968c617925db2bd5f8f80203839a0971d
use the store id when the cart/session id is not set to determine when we need to reload config
[ { "change_type": "MODIFY", "old_path": "src/PayV2/view/frontend/web/js/action/checkout-session-config-load.js", "new_path": "src/PayV2/view/frontend/web/js/action/checkout-session-config-load.js", "diff": "@@ -31,7 +31,7 @@ define([\nreturn localStorage;\n};\nreturn function (callback) {\n- var cartId = customerData.get('cart')()['data_id'] || 0;\n+ var cartId = customerData.get('cart')()['data_id'] || window.checkout.storeId;\nif (cartId !== getLocalStorage().get('cart_id')) {\ncallbacks.push(callback);\nif (callbacks.length == 1) {\n" }, { "change_type": "MODIFY", "old_path": "src/PayV2/view/frontend/web/js/amazon-button.js", "new_path": "src/PayV2/view/frontend/web/js/amazon-button.js", "diff": "@@ -100,7 +100,7 @@ define([\n$buttonRoot.html('<img src=\"' + require.toUrl('images/loader-1.gif') + '\" alt=\"\" width=\"24\" />');\n$buttonContainer.empty().append($buttonRoot);\nthis._loadButtonConfig(function (buttonConfig) {\n- amazon.Pay.renderButton('#' + $buttonRoot.empty().uniqueId().attr('id'), buttonConfig);\n+ amazon.Pay.renderButton('#' + $buttonRoot.empty().removeUniqueId().uniqueId().attr('id'), buttonConfig);\n$('.amazon-button-container-v2 .field-tooltip').fadeIn();\n});\n}, this);\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
APF-286 - use the store id when the cart/session id is not set to determine when we need to reload config
21,241
07.01.2021 18:05:07
21,600
41e9a28d12780d47a1bd5a6b0341028473af2754
call closeChargePermission instead of cancelCharge when voiding an order
[ { "change_type": "MODIFY", "old_path": "src/PayV2/Gateway/Http/Client/VoidClient.php", "new_path": "src/PayV2/Gateway/Http/Client/VoidClient.php", "diff": "@@ -23,7 +23,7 @@ class VoidClient extends AbstractClient\n*/\nprotected function process(array $data)\n{\n- $response = $this->adapter->cancelCharge($data['store_id'], $data['charge_id']);\n+ $response = $this->adapter->closeChargePermission($data['store_id'], $data['charge_permission_id'], 'MerchantClosed', true);\nreturn $response;\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "src/PayV2/Gateway/Request/VoidRequestBuilder.php", "new_path": "src/PayV2/Gateway/Request/VoidRequestBuilder.php", "diff": "@@ -46,10 +46,18 @@ class VoidRequestBuilder implements BuilderInterface\n$paymentDO = $this->subjectReader->readPayment($buildSubject);\n$orderDO = $paymentDO->getOrder();\n+ $chargePermissionId = $paymentDO->getPayment()->getAdditionalInformation('charge_permission_id');\n+\n+ // If we do not have a charge permission on the payment, try the first 3 sections of transaction ID\n+ if (empty($chargePermissionId)) {\n+ $transactionId = explode('-', $paymentDO->getPayment()->getParentTransactionId());\n+ $chargePermissionId = implode('-', array_slice($transactionId, 0, 3));\n+ }\n+\nif ($orderDO) {\n$data = [\n'store_id' => $orderDO->getStoreId(),\n- 'charge_id' => $paymentDO->getPayment()->getParentTransactionId(),\n+ 'charge_permission_id' => $chargePermissionId,\n];\n}\nreturn $data;\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
APF-284 - call closeChargePermission instead of cancelCharge when voiding an order
21,241
08.01.2021 16:00:19
21,600
f99679a120ecca40bee6beb6c83c4e349e5c2f25
Code sniffer fixes, shorten line lengths
[ { "change_type": "MODIFY", "old_path": "src/PayV2/Controller/Login/Checkout.php", "new_path": "src/PayV2/Controller/Login/Checkout.php", "diff": "@@ -35,7 +35,10 @@ class Checkout extends \\Amazon\\PayV2\\Controller\\Login\n$checkoutSessionId\n);\n- $this->checkoutSessionManagement->storeCheckoutSession($this->session->getQuote()->getId(), $checkoutSessionId);\n+ $this->checkoutSessionManagement->storeCheckoutSession(\n+ $this->session->getQuote()->getId(),\n+ $checkoutSessionId\n+ );\nif (!$this->amazonConfig->isLwaEnabled()) {\n$userInfo = $checkoutSession['buyer'];\n" }, { "change_type": "MODIFY", "old_path": "src/PayV2/Gateway/Http/Client/VoidClient.php", "new_path": "src/PayV2/Gateway/Http/Client/VoidClient.php", "diff": "@@ -23,7 +23,13 @@ class VoidClient extends AbstractClient\n*/\nprotected function process(array $data)\n{\n- $response = $this->adapter->closeChargePermission($data['store_id'], $data['charge_permission_id'], 'MerchantClosed', true);\n+ $response = $this->adapter->closeChargePermission(\n+ $data['store_id'],\n+ $data['charge_permission_id'],\n+ 'MerchantClosed',\n+ true\n+ );\n+\nreturn $response;\n}\n}\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
Code sniffer fixes, shorten line lengths
21,241
08.01.2021 16:02:14
21,600
1492dfbed9efa64dffe44bf0c87a171e66cff57c
use the order's Charge Permission ID for the void message instead of the parent transaction ID (which will be a Charge)
[ { "change_type": "MODIFY", "old_path": "src/PayV2/etc/di.xml", "new_path": "src/PayV2/etc/di.xml", "diff": "<type name=\"Magento\\Payment\\Model\\Method\\Adapter\">\n<plugin name=\"amazon_payv2_pay_action\" type=\"Amazon\\PayV2\\Plugin\\ModelMethodAdapter\" sortOrder=\"1\" />\n</type>\n+ <type name=\"Magento\\Sales\\Model\\Order\\Payment\\Transaction\\Manager\">\n+ <plugin name=\"amazon_payv2_update_transaction_id\" type=\"Amazon\\PayV2\\Plugin\\PaymentTransactionIdUpdate\" sortOrder=\"1\" />\n+ </type>\n</config>\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
APF-284 - use the order's Charge Permission ID for the void message instead of the parent transaction ID (which will be a Charge)
21,241
08.01.2021 17:46:15
21,600
d861377d9d0f05917cd56636cb866f6e11b0be1a
add field validation for Amazon config
[ { "change_type": "MODIFY", "old_path": "src/PayV2/etc/adminhtml/system.xml", "new_path": "src/PayV2/etc/adminhtml/system.xml", "diff": "<config_path>payment/amazon_payment_v2/private_key</config_path>\n<frontend_model>Amazon\\PayV2\\Model\\Config\\Form\\Privatekey</frontend_model>\n<backend_model>Magento\\Config\\Model\\Config\\Backend\\Encrypted</backend_model>\n+ <validate>validate-private-key</validate>\n</field>\n<field id=\"public_key_id\" translate=\"label comment\" type=\"text\" sortOrder=\"6\" showInDefault=\"1\" showInWebsite=\"1\" showInStore=\"1\">\n<label>Public Key ID</label>\n<config_path>payment/amazon_payment_v2/public_key_id</config_path>\n+ <validate>validate-amzn-public-key-id</validate>\n</field>\n<field id=\"merchant_id_v2\" translate=\"label\" type=\"text\" sortOrder=\"10\" showInDefault=\"1\" showInWebsite=\"1\" showInStore=\"1\">\n<label>Merchant Id</label>\n<config_path>payment/amazon_payment_v2/merchant_id</config_path>\n+ <validate>validate-amzn-merchant-id</validate>\n</field>\n<field id=\"store_id\" translate=\"label\" type=\"text\" sortOrder=\"40\" showInDefault=\"1\" showInWebsite=\"1\" showInStore=\"1\">\n<label>Store Id</label>\n<comment><![CDATA[Referred as clientId in SellerCentral.]]></comment>\n<config_path>payment/amazon_payment_v2/store_id</config_path>\n+ <validate>validate-amzn-store-id</validate>\n</field>\n<field id=\"payment_region\" translate=\"label\" type=\"select\" sortOrder=\"60\" showInDefault=\"1\" showInWebsite=\"1\" showInStore=\"1\">\n<label>Payment Region</label>\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
APF-287 - add field validation for Amazon config
21,241
08.01.2021 17:54:30
21,600
7a682f64d215b42962b5c42bd042cd637efac32d
update validation message to allow 13 or 14 characters for merchant ID
[ { "change_type": "MODIFY", "old_path": "src/PayV2/view/adminhtml/web/js/validation-mixin.js", "new_path": "src/PayV2/view/adminhtml/web/js/validation-mixin.js", "diff": "@@ -48,7 +48,7 @@ define(['jquery'], function ($) {\n}\nreturn (/^[0-9A-Z]{13}[0-9A-Z]?$/).test(v);\n},\n- $.mage.__('Merchant Id field is invalid. It must contain 14 characters. Please check and try again')\n+ $.mage.__('Merchant Id field is invalid. It must contain 13 or 14 characters. Please check and try again')\n),\n$.validator.addMethod(\n'validate-amzn-public-key-id',\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
APF-287 - update validation message to allow 13 or 14 characters for merchant ID
21,241
11.01.2021 10:19:31
21,600
b3855a251f42407cb04815ebb6454da5acd3ac55
make credential fields depend on AP being active, and do not allow them to be empty
[ { "change_type": "MODIFY", "old_path": "src/PayV2/etc/adminhtml/system.xml", "new_path": "src/PayV2/etc/adminhtml/system.xml", "diff": "<frontend_model>Amazon\\PayV2\\Model\\Config\\Form\\Privatekey</frontend_model>\n<backend_model>Magento\\Config\\Model\\Config\\Backend\\Encrypted</backend_model>\n<validate>validate-private-key</validate>\n+ <depends><field id=\"active_v2\">1</field></depends>\n</field>\n<field id=\"public_key_id\" translate=\"label comment\" type=\"text\" sortOrder=\"6\" showInDefault=\"1\" showInWebsite=\"1\" showInStore=\"1\">\n<label>Public Key ID</label>\n<config_path>payment/amazon_payment_v2/public_key_id</config_path>\n<validate>validate-amzn-public-key-id</validate>\n+ <depends><field id=\"active_v2\">1</field></depends>\n</field>\n<field id=\"merchant_id_v2\" translate=\"label\" type=\"text\" sortOrder=\"10\" showInDefault=\"1\" showInWebsite=\"1\" showInStore=\"1\">\n<label>Merchant Id</label>\n<config_path>payment/amazon_payment_v2/merchant_id</config_path>\n<validate>validate-amzn-merchant-id</validate>\n+ <depends><field id=\"active_v2\">1</field></depends>\n</field>\n<field id=\"store_id\" translate=\"label\" type=\"text\" sortOrder=\"40\" showInDefault=\"1\" showInWebsite=\"1\" showInStore=\"1\">\n<label>Store Id</label>\n<comment><![CDATA[Referred as clientId in SellerCentral.]]></comment>\n<config_path>payment/amazon_payment_v2/store_id</config_path>\n<validate>validate-amzn-store-id</validate>\n+ <depends><field id=\"active_v2\">1</field></depends>\n</field>\n<field id=\"payment_region\" translate=\"label\" type=\"select\" sortOrder=\"60\" showInDefault=\"1\" showInWebsite=\"1\" showInStore=\"1\">\n<label>Payment Region</label>\n<source_model>Amazon\\PayV2\\Model\\Config\\Source\\PaymentRegion</source_model>\n<config_path>payment/amazon_payment/payment_region</config_path>\n+ <depends><field id=\"active_v2\">1</field></depends>\n</field>\n<field id=\"sandbox\" translate=\"label\" type=\"select\" sortOrder=\"70\" showInDefault=\"1\" showInWebsite=\"1\" showInStore=\"0\">\n<label>Sandbox</label>\n<source_model>Magento\\Config\\Model\\Config\\Source\\Yesno</source_model>\n<config_path>payment/amazon_payment/sandbox</config_path>\n+ <depends><field id=\"active_v2\">1</field></depends>\n</field>\n<field id=\"ipn_url_v2\" type=\"note\" translate=\"label\" sortOrder=\"100\" showInDefault=\"1\" showInWebsite=\"1\" showInStore=\"1\">\n<label>IPN URL</label>\n<frontend_model>Amazon\\PayV2\\Block\\Adminhtml\\System\\Config\\Form\\IpnUrl</frontend_model>\n<comment><![CDATA[Add this url in SellerCentral to enable IPN.]]></comment>\n+ <depends><field id=\"active_v2\">1</field></depends>\n</field>\n</group>\n<group id=\"options\" translate=\"label\" type=\"text\" sortOrder=\"20\" showInDefault=\"1\" showInWebsite=\"1\" showInStore=\"1\">\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
APF-287 - make credential fields depend on AP being active, and do not allow them to be empty
21,241
12.01.2021 13:49:28
21,600
961f947396f64eb95b61c86a21bd5bb53c153fbf
Implemented API credentials verification # Conflicts: # src/PayV2/etc/di.xml
[ { "change_type": "MODIFY", "old_path": "src/PayV2/Client/ClientFactory.php", "new_path": "src/PayV2/Client/ClientFactory.php", "diff": "@@ -62,16 +62,16 @@ class ClientFactory implements ClientFactoryInterface\n/**\n* {@inheritDoc}\n*/\n- public function create($scopeId = null, $scope = ScopeInterface::SCOPE_STORE)\n+ public function create($scopeId = null, $scope = ScopeInterface::SCOPE_STORE, array $config = [])\n{\n- $config = [\n+ $client = $this->objectManager->create($this->instanceName, [\n+ 'amazonConfig' => array_merge([\n'public_key_id' => $this->amazonConfig->getPublicKeyId($scope, $scopeId),\n'private_key' => $this->amazonConfig->getPrivateKey($scope, $scopeId),\n'sandbox' => $this->amazonConfig->isSandboxEnabled($scope, $scopeId),\n'region' => $this->amazonConfig->getRegion($scope, $scopeId),\n- ];\n-\n- $client = $this->objectManager->create($this->instanceName, ['amazonConfig' => $config]);\n+ ], $config),\n+ ]);\nif ($client instanceof LoggerAwareInterface && $this->amazonConfig->isLoggingEnabled($scope, $scopeId)) {\n$client->setLogger($this->logger);\n" }, { "change_type": "MODIFY", "old_path": "src/PayV2/Client/ClientFactoryInterface.php", "new_path": "src/PayV2/Client/ClientFactoryInterface.php", "diff": "@@ -25,7 +25,8 @@ interface ClientFactoryInterface\n*\n* @param null|int|string $scopeId\n* @param null|int|string $scope\n+ * @param array $config\n* @return ClientInterface\n*/\n- public function create($scopeId = null, $scope = ScopeInterface::SCOPE_STORE);\n+ public function create($scopeId = null, $scope = ScopeInterface::SCOPE_STORE, array $config = []);\n}\n" }, { "change_type": "MODIFY", "old_path": "src/PayV2/Model/AmazonConfig.php", "new_path": "src/PayV2/Model/AmazonConfig.php", "diff": "@@ -102,6 +102,16 @@ class AmazonConfig\nreturn false;\n}\n+ return $this->isActive($scope, $scopeCode);\n+ }\n+\n+ /**\n+ * @param string $scope\n+ * @param null $scopeCode\n+ * @return string\n+ */\n+ public function isActive($scope = ScopeInterface::SCOPE_STORE, $scopeCode = null)\n+ {\nreturn $this->scopeConfig->isSetFlag(\n'payment/amazon_payment_v2/active',\n$scope,\n" }, { "change_type": "MODIFY", "old_path": "src/PayV2/etc/di.xml", "new_path": "src/PayV2/etc/di.xml", "diff": "<type name=\"Magento\\Sales\\Model\\Order\\Payment\\Transaction\\Manager\">\n<plugin name=\"amazon_payv2_update_transaction_id\" type=\"Amazon\\PayV2\\Plugin\\PaymentTransactionIdUpdate\" sortOrder=\"1\" />\n</type>\n+ <type name=\"Magento\\Config\\Model\\Config\">\n+ <plugin name=\"amazon_payv2_config\" type=\"Amazon\\PayV2\\Plugin\\ConfigCredentialsValidator\" sortOrder=\"100\" disabled=\"false\"/>\n+ </type>\n</config>\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
ASD-365: Implemented API credentials verification # Conflicts: # src/PayV2/etc/di.xml
21,241
12.01.2021 17:59:20
21,600
160bfb2f71753c6960ac2c4f211031a5fbefebb3
remove simplepath CV1 js
[ { "change_type": "MODIFY", "old_path": "src/PayV2/view/adminhtml/requirejs-config.js", "new_path": "src/PayV2/view/adminhtml/requirejs-config.js", "diff": "@@ -17,9 +17,6 @@ var config = {\nmixins: {\n'mage/validation': {\n'Amazon_PayV2/js/validation-mixin': true\n- },\n- 'Amazon_Core/js/simplepath': {\n- 'Amazon_PayV2/js/simplepath-mixin': true\n}\n}\n}\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
APF-267 - remove simplepath CV1 js
21,241
12.01.2021 18:01:27
21,600
4b414c83fcd00ade2902d2086b8d376069df1e77
add toUpper / toLower on credential fields, and remove the merchant ID length validator for now
[ { "change_type": "MODIFY", "old_path": "src/PayV2/etc/adminhtml/system.xml", "new_path": "src/PayV2/etc/adminhtml/system.xml", "diff": "<field id=\"merchant_id_v2\" translate=\"label\" type=\"text\" sortOrder=\"10\" showInDefault=\"1\" showInWebsite=\"1\" showInStore=\"1\">\n<label>Merchant Id</label>\n<config_path>payment/amazon_payment_v2/merchant_id</config_path>\n- <validate>validate-amzn-merchant-id</validate>\n<depends><field id=\"active_v2\">1</field></depends>\n</field>\n<field id=\"store_id\" translate=\"label\" type=\"text\" sortOrder=\"40\" showInDefault=\"1\" showInWebsite=\"1\" showInStore=\"1\">\n" }, { "change_type": "MODIFY", "old_path": "src/PayV2/view/adminhtml/layout/adminhtml_system_config_edit.xml", "new_path": "src/PayV2/view/adminhtml/layout/adminhtml_system_config_edit.xml", "diff": "<page xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"urn:magento:framework:View/Layout/etc/page_configuration.xsd\">\n<head>\n<css src=\"Amazon_PayV2::styles.css\"/>\n+ <script src=\"Amazon_PayV2::js/credentials.js\" />\n</head>\n</page>\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
APF-287 - add toUpper / toLower on credential fields, and remove the merchant ID length validator for now
21,241
12.01.2021 18:14:36
21,600
b9f5d5b229db3ab36223ccc12984934bf037606d
update composer.json to reflect structure change
[ { "change_type": "MODIFY", "old_path": "composer.json", "new_path": "composer.json", "diff": "},\n\"autoload\": {\n\"files\": [\n- \"src/PayV2/registration.php\"\n+ \"registration.php\"\n],\n\"psr-4\": {\n- \"Amazon\\\\PayV2\\\\\": \"src/PayV2\"\n+ \"Amazon\\\\PayV2\\\\\": \"\"\n}\n}\n}\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
APF-268 - update composer.json to reflect structure change
21,241
13.01.2021 14:25:42
21,600
a7487394ff0cbe8c1b4605f69757709f06851842
allow multi-line private keys
[ { "change_type": "MODIFY", "old_path": "view/adminhtml/web/js/validation-mixin.js", "new_path": "view/adminhtml/web/js/validation-mixin.js", "diff": "@@ -35,7 +35,7 @@ define(['jquery'], function ($) {\nif (v == '******') {\nreturn true;\n}\n- return (/^-----BEGIN RSA PRIVATE KEY-----.*-----END RSA PRIVATE KEY-----$/).test(v);\n+ return (/^-----BEGIN RSA PRIVATE KEY-----.*-----END RSA PRIVATE KEY-----$/s).test(v);\n},\n$.mage.__('Private Key field is invalid. It must include header ' +\n'and footer of the private key. Please check and try again')\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
APF-288 - allow multi-line private keys
21,241
13.01.2021 14:26:38
21,600
1474594017388882b1bbf41763a6cee7aa31b615
uncheck "inherit" setting when disabling due to failed credential validation
[ { "change_type": "MODIFY", "old_path": "Plugin/ConfigCredentialsValidator.php", "new_path": "Plugin/ConfigCredentialsValidator.php", "diff": "@@ -24,6 +24,7 @@ class ConfigCredentialsValidator\n{\nconst XML_PATH_API_VERSION = 'groups/amazon_pay/fields/api_version/value';\nconst XML_PATH_ACTIVE = 'groups/amazon_pay/groups/credentials/fields/active_v2/value';\n+ const XML_PATH_ACTIVE_INHERIT = 'groups/amazon_pay/groups/credentials/fields/active_v2/inherit';\nconst XML_PATH_PRIVATE_KEY = 'groups/amazon_pay/groups/credentials/fields/private_key/value';\nconst XML_PATH_PUBLIC_KEY_ID = 'groups/amazon_pay/groups/credentials/fields/public_key_id/value';\nconst XML_PATH_STORE_ID = 'groups/amazon_pay/groups/credentials/fields/store_id/value';\n@@ -221,6 +222,7 @@ class ConfigCredentialsValidator\n}\n}\n} catch (\\Exception $e) {\n+ $this->setDataByPath($subject, self::XML_PATH_ACTIVE_INHERIT, false);\n$this->setDataByPath($subject, self::XML_PATH_ACTIVE, false);\n$this->messageManager->addErrorMessage(__('Failed to enable Amazon Pay: %1', $e->getMessage()));\n}\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
APF-281 - uncheck "inherit" setting when disabling due to failed credential validation
21,241
13.01.2021 14:27:15
21,600
1b7a55db466689087e82add651658adacec29e67
remove unused config field, and take out the setup_version from the module.xml since we use declarative schema
[ { "change_type": "MODIFY", "old_path": "etc/adminhtml/system.xml", "new_path": "etc/adminhtml/system.xml", "diff": "<frontend_model>Magento\\Paypal\\Block\\Adminhtml\\System\\Config\\Fieldset\\Payment</frontend_model>\n<group id=\"credentials\" translate=\"label\" type=\"text\" sortOrder=\"10\" showInDefault=\"1\" showInWebsite=\"1\" showInStore=\"1\">\n<label>Credentials</label>\n- <field id=\"note_v2\" type=\"note\" sortOrder=\"0\" showInDefault=\"1\" showInWebsite=\"1\" showInStore=\"1\">\n- <label></label>\n- <frontend_model>Amazon\\PayV2\\Block\\Adminhtml\\System\\Config\\Form\\Note</frontend_model>\n- </field>\n<field id=\"active_v2\" translate=\"label\" type=\"select\" sortOrder=\"0\" showInDefault=\"1\" showInWebsite=\"1\" showInStore=\"1\">\n<label>Enable Amazon Pay</label>\n<source_model>Magento\\Config\\Model\\Config\\Source\\Yesno</source_model>\n" }, { "change_type": "MODIFY", "old_path": "etc/module.xml", "new_path": "etc/module.xml", "diff": "*/\n-->\n<config xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"urn:magento:framework:Module/etc/module.xsd\">\n- <module name=\"Amazon_PayV2\" setup_version=\"1.0.0\" >\n+ <module name=\"Amazon_PayV2\" >\n</module>\n</config>\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
APF-281 - remove unused config field, and take out the setup_version from the module.xml since we use declarative schema
21,241
15.01.2021 10:44:30
21,600
8ca3379493cbd89417479415912a7ca2937552f9
invalidate js customer data when clicking Amazon Sign-in button
[ { "change_type": "MODIFY", "old_path": "view/frontend/web/js/amazon-login-button.js", "new_path": "view/frontend/web/js/amazon-login-button.js", "diff": "@@ -18,7 +18,8 @@ define([\n'Amazon_PayV2/js/model/storage',\n'mage/url',\n'Amazon_PayV2/js/amazon-checkout',\n-], function ($, checkoutSessionConfigLoad, amazonStorage, url, amazonCheckout) {\n+ 'Magento_Customer/js/customer-data'\n+], function ($, checkoutSessionConfigLoad, amazonStorage, url, amazonCheckout, customerData) {\n'use strict';\nif (amazonStorage.isEnabled) {\n@@ -73,6 +74,7 @@ define([\nthis._loadButtonConfig(config, function (buttonConfig) {\namazon.Pay.renderButton('#' + $buttonRoot.empty().uniqueId().attr('id'), buttonConfig);\n$('.amazon-button-container-v2 .field-tooltip').fadeIn();\n+ $('.login-with-amazon').click(function() { customerData.invalidate('*'); });\n});\n}, this);\n},\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
APF-292 - invalidate js customer data when clicking Amazon Sign-in button
21,241
15.01.2021 17:10:20
21,600
5649795013db9d54ba906e31d5b0df29a99dc730
update README to note removing prior versions
[ { "change_type": "MODIFY", "old_path": "README.md", "new_path": "README.md", "diff": "@@ -19,6 +19,23 @@ All Amazon Pay transactions are protected by Amazon's A-to-z Guarantee.\nYou can find a list of modules in the require section of the `composer.json` file located in the\nsame directory as this `README.md` file.\n+## Prerequisite for installation\n+\n+Before installing Amazon Pay, please remove any previously installed versions. This includes all directories\n+and their files from the following paths:\n+\n+* `app/code/Amazon/PayV2`\n+* `vendor/amzn/amazon-pay-and-login-with-amazon-core-module`\n+* `vendor/amzn/amazon-pay-module`\n+* `vendor/amzn/login-with-amazon-module`\n+\n+If you are using composer to install Amazon Pay, it will remove the files in `vendor` for you, but you will\n+need to manually clean `app/code/Amazon` if present.\n+\n+## Installation\n+\n+The extension is available via composer in Packagist or Magento Marketplace as `amzn/amazon-pay-magento-2-module`.\n+\n## Extension Points\nAmazon Pay does not provide any specific extension points.\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
APF-268 - update README to note removing prior versions
21,241
19.01.2021 16:22:21
21,600
2ebf0881bd7667aa91b2a160b4ae33e612e2bc85
add sign out of amazon button to the password validation page shown when the email used for an Amazon account is already used on the store
[ { "change_type": "MODIFY", "old_path": "view/frontend/requirejs-config.js", "new_path": "view/frontend/requirejs-config.js", "diff": "@@ -30,7 +30,8 @@ var config = {\namazonPayV2Button: 'Amazon_PayV2/js/amazon-button',\namazonPayV2Config: 'Amazon_PayV2/js/model/amazonPayV2Config',\namazonPayV2LoginButton: 'Amazon_PayV2/js/amazon-login-button',\n- amazonPayV2Logout: 'Amazon_PayV2/js/amazon-logout'\n+ amazonPayV2Logout: 'Amazon_PayV2/js/amazon-logout',\n+ amazonPayV2LogoutButton: 'Amazon_PayV2/js/amazon-logout-button'\n}\n},\npaths: {\n" }, { "change_type": "MODIFY", "old_path": "view/frontend/templates/form/validate.phtml", "new_path": "view/frontend/templates/form/validate.phtml", "diff": "<span><?= $block->escapeHtml(__('Forgot Your Password?')) ?></span>\n</a>\n</div>\n+ <div class=\"secondary amazon-logout\">\n+ <button class=\"amazon-logout-button\" data-mage-init='{\"amazonPayV2LogoutButton\": {}}'>Sign out of Amazon</button>\n+ </div>\n</div>\n</fieldset>\n</form>\n" }, { "change_type": "ADD", "old_path": null, "new_path": "view/frontend/web/js/amazon-logout-button.js", "diff": "+/**\n+ * Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\").\n+ * You may not use this file except in compliance with the License.\n+ * A copy of the License is located at\n+ *\n+ * http://aws.amazon.com/apache2.0\n+ *\n+ * or in the \"license\" file accompanying this file. This file is distributed\n+ * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n+ * express or implied. See the License for the specific language governing\n+ * permissions and limitations under the License.\n+ */\n+\n+define([\n+ 'jquery',\n+ 'Amazon_PayV2/js/amazon-checkout',\n+ 'mage/cookies'\n+], function ($, amazonCheckout) {\n+ 'use strict';\n+\n+ $('.amazon-logout-button').click(function() {\n+ amazonCheckout.withAmazonCheckout(function (amazon, args) {\n+ amazon.Pay.signout();\n+ var redirectUrl = '/customer/account/login';\n+ var myParams = new URLSearchParams(window.location.search);\n+ if (myParams.has('amazonCheckoutSessionId')) {\n+ redirectUrl = '/checkout/';\n+ }\n+ window.location.assign(redirectUrl);\n+ });\n+ });\n+});\n" }, { "change_type": "MODIFY", "old_path": "view/frontend/web/js/amazon-logout.js", "new_path": "view/frontend/web/js/amazon-logout.js", "diff": "define([\n'jquery',\n- 'amazonCore',\n'Amazon_PayV2/js/amazon-checkout',\n'mage/cookies'\n-], function ($, core, amazonCheckout) {\n+], function ($, amazonCheckout) {\n'use strict';\n$.widget('amazon.AmazonLogout', {\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
APF-290 - add sign out of amazon button to the password validation page shown when the email used for an Amazon account is already used on the store
21,241
19.01.2021 16:33:54
21,600
0bd72f74a31adb0700fb41e68d69a4541e6f5626
update styling on the Sign-in with Amazon section
[ { "change_type": "MODIFY", "old_path": "view/frontend/web/css/source/_module.less", "new_path": "view/frontend/web/css/source/_module.less", "diff": "}\n}\n+ /* for the \"Amazon Sign-in\" button */\n+ .amazon-button-container {\n+ display: table;\n+ margin: 0 0 22px;\n+\n+ &__cell {\n+ display: table-cell;\n+ min-width: 45px;\n+ position: relative;\n+ }\n+\n+ img {\n+ display: block;\n+ }\n+\n+ .field-tooltip {\n+ margin: -12px 0 0;\n+ right: 5px;\n+ top: 50%;\n+ }\n+ }\n+\n.cart-summary {\n.amazon-button-container-v2 {\n.checkout-methods-items {\nmargin-bottom: 0;\n}\n}\n+ .login-container {\n+ .block {\n+ &-amazon-login {\n+ clear: none;\n+ float: right;\n+ .actions-toolbar {\n+ margin-top: 25px;\n+ }\n+ }\n+ &:nth-child(2) + .block-amazon-login {\n+ clear: none;\n+ }\n+ }\n+ }\n+\n+ .amazon-validate-container {\n+ margin: 40px auto 0 auto;\n+ width: 500px;\n+\n+ .primary {\n+ width: 190px;\n+ }\n+\n+ .continue-as-guest {\n+ width: 130px;\n+ }\n+\n+ .forgot-password {\n+ text-align: right;\n+ width: 175px;\n+ }\n+ }\n}\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
APF-295 - update styling on the Sign-in with Amazon section
21,241
19.01.2021 16:34:20
21,600
50e47af88a7a233a87c6fa1dbeae99c7edd625c8
Ensure we have a return value from completeCheckoutSession call
[ { "change_type": "MODIFY", "old_path": "Model/CheckoutSessionManagement.php", "new_path": "Model/CheckoutSessionManagement.php", "diff": "@@ -602,7 +602,12 @@ class CheckoutSessionManagement implements \\Amazon\\PayV2\\Api\\CheckoutSessionMana\nif ($this->isAvailable($cartId)) {\n$checkoutSession = $this->getCheckoutSessionForCart($cart);\n}\n- if ($checkoutSession && $this->canComplete($cart, $checkoutSession)) {\n+ if (empty($checkoutSession) || !$this->canComplete($cart, $checkoutSession)) {\n+ return [\n+ 'success' => false,\n+ 'message' => __(\"Unable to complete Amazon Pay checkout\"),\n+ ];\n+ }\ntry {\nif (!$cart->getCustomer()->getId()) {\n$cart->setCheckoutMethod(\\Magento\\Quote\\Api\\CartManagementInterface::METHOD_GUEST);\n@@ -734,7 +739,6 @@ class CheckoutSessionManagement implements \\Amazon\\PayV2\\Api\\CheckoutSessionMana\nthrow $e;\n}\n- }\nreturn $result;\n}\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
Ensure we have a return value from completeCheckoutSession call
21,241
21.01.2021 12:05:31
21,600
c0c553ca48187f65769135611af28584748f33a0
use a text link instead of button for canceling Sign in with Amazon
[ { "change_type": "MODIFY", "old_path": "view/frontend/templates/form/validate.phtml", "new_path": "view/frontend/templates/form/validate.phtml", "diff": "</a>\n</div>\n<div class=\"secondary amazon-logout\">\n- <button class=\"amazon-logout-button\" data-mage-init='{\"amazonPayV2LogoutButton\": {}}'>Sign out of Amazon</button>\n+ <a class=\"amazon-logout-button\" href=\"#\" data-mage-init='{\"amazonPayV2LogoutButton\": {}}'>Sign out from Amazon</a>\n</div>\n</div>\n</fieldset>\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
APF-290 - use a text link instead of button for canceling Sign in with Amazon
21,241
21.01.2021 12:06:17
21,600
18fd78a309516583cfd3618257def094b04ce697
allow make "RSA" piece of private key header/footer optional - some generated keys don't have it
[ { "change_type": "MODIFY", "old_path": "view/adminhtml/web/js/validation-mixin.js", "new_path": "view/adminhtml/web/js/validation-mixin.js", "diff": "@@ -35,7 +35,7 @@ define(['jquery'], function ($) {\nif (v == '******') {\nreturn true;\n}\n- return (/^-----BEGIN RSA PRIVATE KEY-----.*-----END RSA PRIVATE KEY-----$/s).test(v);\n+ return (/^-----BEGIN (RSA )?PRIVATE KEY-----.*-----END (RSA )?PRIVATE KEY-----$/s).test(v);\n},\n$.mage.__('Private Key field is invalid. It must include header ' +\n'and footer of the private key. Please check and try again')\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
APF-288 - allow make "RSA" piece of private key header/footer optional - some generated keys don't have it
21,241
25.01.2021 17:52:46
21,600
387e90c58a313a42fe0853460397281496b7750c
additional v2 changes, including renaming files. Checkout is functioning but needs additional testing
[ { "change_type": "RENAME", "old_path": "Controller/Adminhtml/PayV2/DownloadLog.php", "new_path": "Controller/Adminhtml/Pay/DownloadLog.php", "diff": "" }, { "change_type": "RENAME", "old_path": "Model/Adapter/AmazonPayV2Adapter.php", "new_path": "Model/Adapter/AmazonPayAdapter.php", "diff": "" }, { "change_type": "MODIFY", "old_path": "Model/AmazonConfig.php", "new_path": "Model/AmazonConfig.php", "diff": "@@ -511,7 +511,7 @@ class AmazonConfig\n);\nif (empty($result)) {\n$result = $this->storeManager->getStore()->getUrl(\n- 'amazon_payv2/login/checkout',\n+ 'amazon_pay/login/checkout',\n['_forced_secure' => true]\n);\n}\n@@ -530,7 +530,7 @@ class AmazonConfig\n);\nif (empty($result)) {\n$result = $this->storeManager->getStore()->getUrl(\n- 'amazon_payv2/checkout/completeSession',\n+ 'amazon_pay/checkout/completeSession',\n['_forced_secure' => true]\n);\n}\n" }, { "change_type": "RENAME", "old_path": "view/frontend/layout/amazon_payv2_login_validate.xml", "new_path": "view/frontend/layout/amazon_pay_login_validate.xml", "diff": "" }, { "change_type": "MODIFY", "old_path": "view/frontend/layout/checkout_index_index.xml", "new_path": "view/frontend/layout/checkout_index_index.xml", "diff": "<item name=\"children\" xsi:type=\"array\">\n<item name=\"renders\" xsi:type=\"array\">\n<item name=\"children\" xsi:type=\"array\">\n- <item name=\"amazon_payment-method\" xsi:type=\"array\">\n+ <item name=\"amazon_payment_v2-method\" xsi:type=\"array\">\n<item name=\"component\" xsi:type=\"string\">Amazon_Pay/js/view/payment/amazon-payment-method</item>\n<item name=\"config\" xsi:type=\"array\">\n<item name=\"tooltip\" xsi:type=\"string\" translate=\"true\">Are you an Amazon customer? Pay now with address and payment details stored in your Amazon account.</item>\n</item>\n<item name=\"methods\" xsi:type=\"array\">\n- <item name=\"amazon_payment\" xsi:type=\"array\">\n+ <item name=\"amazon_payment_v2\" xsi:type=\"array\">\n<item name=\"isBillingAddressRequired\" xsi:type=\"boolean\">true</item>\n</item>\n</item>\n" }, { "change_type": "RENAME", "old_path": "view/frontend/web/js/model/amazon-payv2-config.js", "new_path": "view/frontend/web/js/model/amazon-pay-config.js", "diff": "" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
APF-278 - additional v2 changes, including renaming files. Checkout is functioning but needs additional testing
21,270
22.12.2020 12:56:30
28,800
6995d5d7d1a78dd5c3059b823e5c75205841b191
fixes credit memo with multi-auth and captureinitiated
[ { "change_type": "MODIFY", "old_path": "Model/AsyncManagement/Charge.php", "new_path": "Model/AsyncManagement/Charge.php", "diff": "@@ -279,6 +279,7 @@ class Charge extends AbstractOperation\n$invoice->register();\n}\nif ($invoice && ($invoice->canCapture() || $invoice->getOrder()->getStatus() == Order::STATE_PAYMENT_REVIEW)) {\n+ $order = $invoice->getOrder();\n$payment = $order->getPayment();\n$invoice->pay();\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
ASD-594 fixes credit memo with multi-auth and captureinitiated
21,270
17.12.2020 10:59:04
28,800
f367dd2b89f805432466a21dfb3d6f499770150c
adds cloudfront cdn whitelist
[ { "change_type": "MODIFY", "old_path": "etc/csp_whitelist.xml", "new_path": "etc/csp_whitelist.xml", "diff": "<value id=\"amazon_cloudfront20\" type=\"host\">d2bomicxw8p7ii.cloudfront.net</value>\n<value id=\"amazon_cloudfront21\" type=\"host\">d3aypcdgvjnnam.cloudfront.net</value>\n<value id=\"amazon_cloudfront22\" type=\"host\">d2a3iuf10348gy.cloudfront.net</value>\n+ <value id=\"amazon_cloudfront23\" type=\"host\">d23yuld0pofhhw.cloudfront.net</value>\n<value id=\"ssl_images_amazon_com\" type=\"host\">*.ssl-images-amazon.com</value>\n<value id=\"ssl_images_amazon_co_uk\" type=\"host\">*.ssl-images-amazon.co.uk</value>\n<value id=\"ssl_images_amazon_co_jp\" type=\"host\">*.ssl-images-amazon.co.jp</value>\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
ASD-559 adds cloudfront cdn whitelist
21,241
06.01.2021 12:44:31
21,600
20db4b6d2522434ca1ac7a91b523ef2e269443cc
when capturing payment, make sure that chargeId is set on the invoice and that the invoice is marked as closed
[ { "change_type": "MODIFY", "old_path": "Model/AsyncManagement/Charge.php", "new_path": "Model/AsyncManagement/Charge.php", "diff": "@@ -281,6 +281,7 @@ class Charge extends AbstractOperation\nif ($invoice && ($invoice->canCapture() || $invoice->getOrder()->getStatus() == Order::STATE_PAYMENT_REVIEW)) {\n$order = $invoice->getOrder();\n$payment = $order->getPayment();\n+ $invoice->setTransactionId($chargeId);\n$invoice->pay();\n$order->addRelatedObject($invoice);\n@@ -298,6 +299,7 @@ class Charge extends AbstractOperation\n$payment->setDataUsingMethod('base_amount_paid_online', $chargeAmount);\n$payment->addTransactionCommentsToOrder($transaction, $message);\n+ $transaction->setIsClosed(true);\n$this->setProcessing($order);\n$order->save();\n$this->asyncLogger->info('Captured Order #' . $order->getIncrementId());\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
ASD-609 - when capturing payment, make sure that chargeId is set on the invoice and that the invoice is marked as closed
21,241
27.01.2021 15:11:29
21,600
676ba912adc74255c420b5dc5c03a5eabd29702f
make sign in button class distinct from pay button
[ { "change_type": "MODIFY", "old_path": "view/frontend/templates/login.phtml", "new_path": "view/frontend/templates/login.phtml", "diff": "</p>\n<div class=\"actions-toolbar\">\n<div class=\"primary\">\n- <div class=\"amazon-button-container\">\n- <div class=\"amazon-button-container__cell\">\n+ <div class=\"amazon-sign-in-button-container\">\n+ <div class=\"amazon-sign-in-button-container__cell\">\n<div id=\"AmazonPayButton\"\nclass=\"login-with-amazon\"\ndata-mage-init='{\"amazonPayLoginButton\": {}}'>\n</div>\n</div>\n- <div class=\"amazon-button-container__cell\">\n+ <div class=\"amazon-sign-in-button-container__cell\">\n<div class=\"field-tooltip toggle\">\n<span class=\"field-tooltip-action action-help\"\ndata-mage-init='{\"dropdown\": {\"activeClass\": \"_active\"}}'\n" }, { "change_type": "MODIFY", "old_path": "view/frontend/web/css/source/_module.less", "new_path": "view/frontend/web/css/source/_module.less", "diff": "}\n/* for the \"Amazon Sign-in\" button */\n- .amazon-button-container {\n+ .amazon-sign-in-button-container {\ndisplay: table;\nmargin: 0 0 22px;\n" }, { "change_type": "MODIFY", "old_path": "view/frontend/web/js/amazon-login-button.js", "new_path": "view/frontend/web/js/amazon-login-button.js", "diff": "@@ -73,7 +73,7 @@ define([\n$buttonContainer.empty().append($buttonRoot);\nthis._loadButtonConfig(config, function (buttonConfig) {\namazon.Pay.renderButton('#' + $buttonRoot.empty().uniqueId().attr('id'), buttonConfig);\n- $('.amazon-button-container .field-tooltip').fadeIn();\n+ $('.amazon-sign-in-button-container .field-tooltip').fadeIn();\n$('.login-with-amazon').click(function() { customerData.invalidate('*'); });\n});\n}, this);\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
APF-278 - make sign in button class distinct from pay button
21,241
28.01.2021 10:51:02
21,600
d82731f5ce166d5c711a939751331c5eb817f6dc
fix for codesniffer line length
[ { "change_type": "MODIFY", "old_path": "view/frontend/templates/form/validate.phtml", "new_path": "view/frontend/templates/form/validate.phtml", "diff": "</a>\n</div>\n<div class=\"secondary amazon-logout\">\n- <a class=\"amazon-logout-button\" href=\"#\" data-mage-init='{\"amazonPayLogoutButton\": {}}'>Sign out from Amazon</a>\n+ <a class=\"amazon-logout-button\" href=\"#\"\n+ data-mage-init='{\"amazonPayLogoutButton\": {}}'>Sign out from Amazon</a>\n</div>\n</div>\n</fieldset>\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
APF-290 - fix for codesniffer line length
21,241
29.01.2021 10:19:13
21,600
f91d07f5ba3051326b2c25912106d887a99fc127
Add php 7.2 support that somehow got lost
[ { "change_type": "MODIFY", "old_path": "composer.json", "new_path": "composer.json", "diff": "\"phpunit/phpunit\": \"4.1.0\"\n},\n\"require\": {\n- \"php\": \"~7.0.13||~7.1.0||~7.3.0||~7.4.0\",\n+ \"php\": \"~7.0.13||~7.1.0||~7.2.0||~7.3.0||~7.4.0\",\n\"magento/framework\": \"*\",\n\"magento/module-sales\": \"*\",\n\"magento/module-checkout\": \"*\",\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
Add php 7.2 support that somehow got lost
21,241
01.02.2021 10:43:17
21,600
92bd63ba3a85720dd66b5ca75255f7b4b1987339
Add specific version requirements of Magento core modules
[ { "change_type": "MODIFY", "old_path": "composer.json", "new_path": "composer.json", "diff": "},\n\"require\": {\n\"php\": \"~7.0.13||~7.1.0||~7.2.0||~7.3.0||~7.4.0\",\n- \"magento/framework\": \"*\",\n- \"magento/module-sales\": \"*\",\n- \"magento/module-checkout\": \"*\",\n- \"magento/module-payment\": \"*\",\n- \"magento/module-eav\": \"*\",\n- \"magento/module-developer\": \"*\",\n- \"magento/module-config\": \"*\",\n- \"magento/module-backend\": \"*\",\n- \"magento/module-quote\": \"*\",\n- \"magento/module-customer\": \"*\",\n- \"magento/module-store\": \"*\",\n+ \"magento/framework\": \"^102.0||^103.0\",\n+ \"magento/module-sales\": \"^100.0||^101.0||^102.0||^103.0\",\n+ \"magento/module-checkout\": \"^100.0\",\n+ \"magento/module-payment\": \"^100.0\",\n+ \"magento/module-eav\": \"^102.0\",\n+ \"magento/module-developer\": \"^100.0\",\n+ \"magento/module-config\": \"^101.0\",\n+ \"magento/module-backend\": \"^101.0||^102.0\",\n+ \"magento/module-quote\": \"^101.0\",\n+ \"magento/module-customer\": \"^102.0||^103.0\",\n+ \"magento/module-store\": \"^101.0\",\n\"amzn/amazon-pay-api-sdk-php\": \"^2.2\",\n\"aws/aws-php-sns-message-validator\": \"^1.5\"\n},\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
Add specific version requirements of Magento core modules
21,241
01.02.2021 14:36:54
21,600
316eec2a410f0f0f37703bb3d28e748ed221e0c6
get language a differet way to remove the error suppression
[ { "change_type": "MODIFY", "old_path": "Model/AmazonConfig.php", "new_path": "Model/AmazonConfig.php", "diff": "@@ -162,8 +162,8 @@ class AmazonConfig\npublic function getLanguage($scope = ScopeInterface::SCOPE_STORE, $scopeCode = null)\n{\n$paymentRegion = $this->getRegion($scope, $scopeCode);\n- // phpcs:ignore Generic.PHP.NoSilencedErrors\n- @list($lang, $region) = explode('_', $this->localeResolver->getLocale());\n+ $localeParts = explode('_', $this->localeResolver->getLocale());\n+ $lang = $localeParts[0];\nswitch ($lang) {\ncase 'de':\n$result = self::LANG_DE;\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
APF-290 - get language a differet way to remove the error suppression
21,270
02.02.2021 11:57:38
28,800
3beced9d93c976cab4df84bad322f6d186c58a6a
adds index to checkout session quote id column
[ { "change_type": "MODIFY", "old_path": "etc/db_schema.xml", "new_path": "etc/db_schema.xml", "diff": "<column name=\"id\"/>\n</constraint>\n<constraint xsi:type=\"foreign\" referenceId=\"AMAZON_PAYV2_CHECKOUT_SESSION_QUOTE_ID_QUOTE_ENTITY_ID\" table=\"amazon_payv2_checkout_session\" column=\"quote_id\" referenceTable=\"quote\" referenceColumn=\"entity_id\" onDelete=\"CASCADE\"/>\n+ <index referenceId=\"AMAZON_PAYV2_CHECKOUT_SESSION_QUOTE_ID\" indexType=\"btree\">\n+ <column name=\"quote_id\"/>\n+ </index>\n<index referenceId=\"AMAZON_PAYV2_CHECKOUT_SESSION_IS_ACTIVE\" indexType=\"btree\">\n<column name=\"is_active\"/>\n</index>\n" }, { "change_type": "MODIFY", "old_path": "etc/db_schema_whitelist.json", "new_path": "etc/db_schema_whitelist.json", "diff": "\"completed_at\": true\n},\n\"index\": {\n- \"AMAZON_PAYV2_CHECKOUT_SESSION_IS_ACTIVE\": true\n+ \"AMAZON_PAYV2_CHECKOUT_SESSION_IS_ACTIVE\": true,\n+ \"AMAZON_PAYV2_CHECKOUT_SESSION_QUOTE_ID\": true\n},\n\"constraint\": {\n\"PRIMARY\": true,\n\"AMAZON_PAYV2_CHECKOUT_SESSION_QUOTE_ID_QUOTE_ENTITY_ID\": true\n}\n+ },\n+ \"amazon_customer\": {\n+ \"column\": {\n+ \"entity_id\": true,\n+ \"customer_id\": true,\n+ \"amazon_id\": true\n+ },\n+ \"constraint\": {\n+ \"PRIMARY\": true,\n+ \"AMAZON_CUSTOMER_CUSTOMER_ID_AMAZON_ID\": true,\n+ \"AMAZON_CUSTOMER_CUSTOMER_ID\": true,\n+ \"AMAZON_CUSTOMER_CUSTOMER_ID_CUSTOMER_ENTITY_ENTITY_ID\": true\n+ }\n}\n}\n\\ No newline at end of file\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
ASD-627 adds index to checkout session quote id column
21,241
04.02.2021 11:51:51
21,600
c24e0a0c9e30bb9cf8e7903dda19c41892ff3097
Add amzn/amazon-payments-magento-2-plugin package to composer replace block
[ { "change_type": "MODIFY", "old_path": "composer.json", "new_path": "composer.json", "diff": "\"amzn/amazon-pay-and-login-with-amazon-core-module\": \"*\",\n\"amzn/login-with-amazon-module\": \"*\",\n\"amzn/amazon-pay-module\": \"*\",\n- \"amzn/amazon-pay-v2-magento-2-module\": \"*\"\n+ \"amzn/amazon-pay-v2-magento-2-module\": \"*\",\n+ \"amzn/amazon-payments-magento-2-plugin\": \"*\"\n},\n\"require-dev\": {\n\"guzzlehttp/guzzle\": \"^6.2.0\",\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
Add amzn/amazon-payments-magento-2-plugin package to composer replace block
21,270
09.02.2021 13:01:04
28,800
fb2167d821aa657e5b5992229510071151b9bf74
adds session load of payment and collect totals
[ { "change_type": "MODIFY", "old_path": "Model/CheckoutSessionManagement.php", "new_path": "Model/CheckoutSessionManagement.php", "diff": "@@ -81,6 +81,11 @@ class CheckoutSessionManagement implements \\Amazon\\Pay\\Api\\CheckoutSessionManage\n*/\nprivate $searchCriteriaBuilder;\n+ /**\n+ * @var \\Magento\\Checkout\\Model\\Session\n+ */\n+ private $magentoCheckoutSession;\n+\n/**\n* @var \\Amazon\\Pay\\Domain\\AmazonAddressFactory\n*/\n@@ -146,6 +151,7 @@ class CheckoutSessionManagement implements \\Amazon\\Pay\\Api\\CheckoutSessionManage\n* @param \\Magento\\Sales\\Api\\OrderPaymentRepositoryInterface $paymentRepository\n* @param \\Magento\\Framework\\Validator\\Factory $validatorFactory ,\n* @param \\Magento\\Directory\\Model\\ResourceModel\\Country\\CollectionFactory $countryCollectionFactory ,\n+ * @param \\Magento\\Checkout\\Model\\Session $magentoCheckoutSession\n* @param \\Amazon\\Pay\\Domain\\AmazonAddressFactory $amazonAddressFactory ,\n* @param \\Amazon\\Pay\\Helper\\Address $addressHelper ,\n* @param \\Amazon\\Pay\\Api\\Data\\CheckoutSessionInterfaceFactory $checkoutSessionFactory\n@@ -167,6 +173,7 @@ class CheckoutSessionManagement implements \\Amazon\\Pay\\Api\\CheckoutSessionManage\n\\Magento\\Sales\\Api\\OrderPaymentRepositoryInterface $paymentRepository,\n\\Magento\\Framework\\Validator\\Factory $validatorFactory,\n\\Magento\\Directory\\Model\\ResourceModel\\Country\\CollectionFactory $countryCollectionFactory,\n+ \\Magento\\Checkout\\Model\\Session $magentoCheckoutSession,\n\\Amazon\\Pay\\Domain\\AmazonAddressFactory $amazonAddressFactory,\n\\Amazon\\Pay\\Helper\\Address $addressHelper,\n\\Amazon\\Pay\\Api\\Data\\CheckoutSessionInterfaceFactory $checkoutSessionFactory,\n@@ -187,6 +194,7 @@ class CheckoutSessionManagement implements \\Amazon\\Pay\\Api\\CheckoutSessionManage\n$this->paymentRepository = $paymentRepository;\n$this->validatorFactory = $validatorFactory;\n$this->countryCollectionFactory = $countryCollectionFactory;\n+ $this->magentoCheckoutSession = $magentoCheckoutSession;\n$this->amazonAddressFactory = $amazonAddressFactory;\n$this->addressHelper = $addressHelper;\n$this->checkoutSessionFactory = $checkoutSessionFactory;\n@@ -625,6 +633,13 @@ class CheckoutSessionManagement implements \\Amazon\\Pay\\Api\\CheckoutSessionManage\n];\n}\n+ // get payment to load it in the session, so that a salesrule that relies on payment method conditions\n+ // can work as expected\n+ $this->magentoCheckoutSession->getQuote()->getPayment();\n+ // collect quote totals before placing order (needed for 2.3.0 and lower)\n+ // https://github.com/amzn/amazon-payments-magento-2-plugin/issues/992\n+ $this->magentoCheckoutSession->getQuote()->collectTotals();\n+\n$orderId = $this->cartManagement->placeOrder($cart->getId());\n$order = $this->orderRepository->get($orderId);\n$result = [\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
adds session load of payment and collect totals
21,241
09.02.2021 18:47:33
21,600
6b0388e2e49ec350d8100cca2d3bcd9e6e39cd4d
always return true for refund async processing, can assume they always succeed
[ { "change_type": "MODIFY", "old_path": "Model/AsyncManagement/Refund.php", "new_path": "Model/AsyncManagement/Refund.php", "diff": "@@ -104,9 +104,9 @@ class Refund extends AbstractOperation\n);\n$this->asyncLogger->info('Refund declined for Order #' . $order->getIncrementId());\n-\n- return true;\n}\n}\n+\n+ return true;\n}\n}\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
ASD-515 - always return true for refund async processing, can assume they always succeed
21,241
09.02.2021 19:06:51
21,600
25ee3eaf1ffbfccfa34bbb25f6d575788cb94a18
add handling for processing CV1 initiated orders using CV2
[ { "change_type": "MODIFY", "old_path": "etc/adminhtml/di.xml", "new_path": "etc/adminhtml/di.xml", "diff": "<type name=\"Magento\\Backend\\Block\\Widget\\Form\\Element\\Dependence\">\n<plugin name=\"amazon_pay_backend_field_dependence\" type=\"Amazon\\Pay\\Plugin\\BackendFieldDependence\" sortOrder=\"1\" />\n</type>\n+\n+ <type name=\"Magento\\Sales\\Model\\Order\">\n+ <plugin name=\"amazon_payv2_legacy_order\" type=\"Amazon\\PayV2\\Plugin\\LegacyPaymentHandler\" />\n+ </type>\n</config>\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
APF-307 - add handling for processing CV1 initiated orders using CV2
21,241
09.02.2021 19:18:43
21,600
0afe8adbe87cffe86f11fda5643158a96bd22cad
remove some PayV2 that snuck through from the testing env
[ { "change_type": "MODIFY", "old_path": "Setup/Patch/Data/MigrateLegacyTransactions.php", "new_path": "Setup/Patch/Data/MigrateLegacyTransactions.php", "diff": "namespace Amazon\\Pay\\Setup\\Patch\\Data;\n-use Amazon\\PayV2\\Api\\Data\\AsyncInterfaceFactory;\n+use Amazon\\Pay\\Api\\Data\\AsyncInterfaceFactory;\nuse Magento\\Framework\\Setup\\ModuleDataSetupInterface;\nuse Magento\\Framework\\Setup\\Patch\\DataPatchInterface;\nuse Magento\\Framework\\App\\ResourceConnection;\n" }, { "change_type": "MODIFY", "old_path": "etc/adminhtml/di.xml", "new_path": "etc/adminhtml/di.xml", "diff": "</type>\n<type name=\"Magento\\Sales\\Model\\Order\">\n- <plugin name=\"amazon_payv2_legacy_order\" type=\"Amazon\\PayV2\\Plugin\\LegacyPaymentHandler\" />\n+ <plugin name=\"amazon_payv2_legacy_order\" type=\"Amazon\\Pay\\Plugin\\LegacyPaymentHandler\" />\n</type>\n</config>\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
APF-307 - remove some PayV2 that snuck through from the testing env
21,241
12.02.2021 09:19:40
21,600
1aef92c8c12b1406e9158cf5d9e91ee92c07bc5c
remove type hinting on method because sometimes the $result could be null
[ { "change_type": "MODIFY", "old_path": "Plugin/LegacyPaymentHandler.php", "new_path": "Plugin/LegacyPaymentHandler.php", "diff": "@@ -36,7 +36,7 @@ class LegacyPaymentHandler\n* @param Payment $result\n* @return Payment\n*/\n- public function afterGetPayment(Order $subject, Payment $result)\n+ public function afterGetPayment(Order $subject, $result)\n{\nif (!empty($result) && $result->getMethod() == 'amazon_payment' && $result->getAuthorizationTransaction()) {\n$result->setMethod('amazon_payment_v2');\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
ASD-637 - remove type hinting on method because sometimes the $result could be null
21,241
12.02.2021 09:22:32
21,600
2c6cae72eec5f1f745c3b622c6ce8f6a7dae4439
update logging to use new method to pull module version
[ { "change_type": "MODIFY", "old_path": "Model/Adapter/AmazonPayAdapter.php", "new_path": "Model/Adapter/AmazonPayAdapter.php", "diff": "@@ -90,7 +90,7 @@ class AmazonPayAdapter\n*/\nprotected function getMerchantCustomInformation()\n{\n- return sprintf('Magento Version: 2, Plugin Version: %s', $this->amazonHelper->getVersion());\n+ return sprintf('Magento Version: 2, Plugin Version: %s', $this->amazonHelper->getModuleVersion());\n}\n/**\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
APF-270 - update logging to use new method to pull module version
21,241
12.02.2021 09:27:52
21,600
895c064182782a52a71d1c13bd3cc9f9e889360c
update async processing to find transaction either by A or C
[ { "change_type": "MODIFY", "old_path": "Model/AsyncManagement/AbstractOperation.php", "new_path": "Model/AsyncManagement/AbstractOperation.php", "diff": "@@ -82,7 +82,9 @@ abstract class AbstractOperation\n*/\nprotected function getTransaction($transactionId, $type = null)\n{\n- $this->searchCriteriaBuilder->addFilter(Transaction::TXN_ID, $transactionId);\n+ // we want to find the auth transaction, but don't know if it is an 'A' or a 'C' so match either\n+ $transactionId = substr_replace($transactionId, '%', 20, 1);\n+ $this->searchCriteriaBuilder->addFilter(Transaction::TXN_ID, $transactionId, 'like');\nif ($type) {\n$this->searchCriteriaBuilder->addFilter(Transaction::TXN_TYPE, $type);\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
APF-307 - update async processing to find transaction either by A or C
21,270
12.02.2021 16:39:19
28,800
f4c36bbc1ebceb518ccc87bda0fd02055cb77f59
fixes product page button hover and some annoyances with it
[ { "change_type": "MODIFY", "old_path": "view/frontend/templates/payment-link-product-page.phtml", "new_path": "view/frontend/templates/payment-link-product-page.phtml", "diff": "<div class=\"amazon-checkout-now\" style=\"display: none;\"><?= $block->escapeHtml(__('Checkout now')) ?></div>\n<div class=\"amazon-button-container amazon-button-product-page\" style=\"display: none;\">\n- <div class=\"amazon-button-column\">\n+ <div class=\"amazon-button-column amazon-product-button\">\n+ <a href=\"javascript:;\"\n+ class=\"amazon-addtoCart\"\n+ id=\"amazon-addtoCart-<?= /* @noEscape */ $block->getJsId() ?>\"\n+ data-mage-init='{\"amazonPayProductAdd\": {}}'>\n<div id=\"PayWithAmazon-Product\"\nclass=\"amazon-checkout-button\"\ndata-mage-init='<?= /* @noEscape */ json_encode([\n]\n]) ?>'>\n</div>\n- <a href=\"javascript:;\"\n- class=\"amazon-addtoCart\"\n- id=\"amazon-addtoCart-<?= /* @noEscape */ $block->getJsId() ?>\"\n- data-mage-init='{\"amazonPayProductAdd\": {}}'>\n</a>\n</div>\n<div class=\"amazon-button-column amazon-button-column-tooltip\">\n" }, { "change_type": "MODIFY", "old_path": "view/frontend/web/css/source/_module.less", "new_path": "view/frontend/web/css/source/_module.less", "diff": "cursor: none;\npointer-events: none;\n}\n+\n+\n+ .amazon-product-button .amazon-checkout-button:active {\n+ pointer-events: none;\n+ }\n+\n+ .amazon-addtoCart {\n+ position: static !important\n+ }\n}\n@media all and (max-width: @screen__m) {\n" }, { "change_type": "MODIFY", "old_path": "view/frontend/web/js/amazon-product-add.js", "new_path": "view/frontend/web/js/amazon-product-add.js", "diff": "@@ -56,8 +56,9 @@ define([\n}, this);\n//setup binds for click\n- $('.amazon-addtoCart').on('click', function () {\n- if ($(_this.options.addToCartForm).valid()) {\n+ $('.amazon-addtoCart').on('click', function (e) {\n+ var target = e.target;\n+ if (target.classList.contains('amazon-addtoCart') && $(_this.options.addToCartForm).valid()) {\naddedViaAmazon = true;\n$(_this.options.addToCartForm).submit();\n}\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
ASD-632 fixes product page button hover and some annoyances with it
21,270
15.02.2021 12:54:04
28,800
c34afa25eed0ad795a38cf6f580a1dc1121a0a6a
fixes pdp tooltip styling
[ { "change_type": "MODIFY", "old_path": "view/frontend/web/css/source/_module.less", "new_path": "view/frontend/web/css/source/_module.less", "diff": "width: 100%;\ndisplay: block;\ntext-align: center;\n- .amazon-button-container {\n- display: inline-block;\n- margin: 0px;\n- }\n.field-tooltip {\n.field-tooltip-content {\ntop: 38px;\n}\n}\n}\n- .product-social-links {\n+ .amazon-minicart-container {\n.amazon-button-container {\n- margin-bottom: 30px;\n- display: block;\n+ display: inline-block;\n+ margin: 0px;\n}\n}\n.amazon-checkout-now {\npadding-top: 10px;\nmargin-bottom: 10px;\n}\n- .amazon-addtoCart {\n- display: block;\n- width: 100%;\n- height: 100%;\n- position: absolute;\n- left: 0;\n- top: 0;\n- }\n.revert-checkout {\nmargin-top: 20px;\n.amazon-product-button .amazon-checkout-button:active {\npointer-events: none;\n}\n-\n- .amazon-addtoCart {\n- position: static !important\n- }\n}\n@media all and (max-width: @screen__m) {\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
ASD-632 fixes pdp tooltip styling
21,241
16.02.2021 17:25:56
21,600
f7e5158c6a3cad31347fd89aca1727adc0c95069
pass the module name into method to get version
[ { "change_type": "MODIFY", "old_path": "Model/Adapter/AmazonPayAdapter.php", "new_path": "Model/Adapter/AmazonPayAdapter.php", "diff": "@@ -90,7 +90,7 @@ class AmazonPayAdapter\n*/\nprotected function getMerchantCustomInformation()\n{\n- return sprintf('Magento Version: 2, Plugin Version: %s', $this->amazonHelper->getModuleVersion());\n+ return sprintf('Magento Version: 2, Plugin Version: %s', $this->amazonHelper->getModuleVersion('Amazon_Pay'));\n}\n/**\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
APF-270 - pass the module name into method to get version
21,241
16.02.2021 17:28:23
21,600
7d9d407d5c9dc7dc3c51fd7bae981d2d022af4de
move legacy transaction plugin to general di.xml because it needs to run for cron as well
[ { "change_type": "MODIFY", "old_path": "etc/adminhtml/di.xml", "new_path": "etc/adminhtml/di.xml", "diff": "<type name=\"Magento\\Backend\\Block\\Widget\\Form\\Element\\Dependence\">\n<plugin name=\"amazon_pay_backend_field_dependence\" type=\"Amazon\\Pay\\Plugin\\BackendFieldDependence\" sortOrder=\"1\" />\n</type>\n-\n- <type name=\"Magento\\Sales\\Model\\Order\">\n- <plugin name=\"amazon_payv2_legacy_order\" type=\"Amazon\\Pay\\Plugin\\LegacyPaymentHandler\" />\n- </type>\n</config>\n" }, { "change_type": "MODIFY", "old_path": "etc/di.xml", "new_path": "etc/di.xml", "diff": "<type name=\"Magento\\Config\\Model\\Config\">\n<plugin name=\"amazon_pay_config\" type=\"Amazon\\Pay\\Plugin\\ConfigCredentialsValidator\" sortOrder=\"100\" disabled=\"false\"/>\n</type>\n+ <type name=\"Magento\\Sales\\Model\\Order\">\n+ <plugin name=\"amazon_payv2_legacy_order\" type=\"Amazon\\Pay\\Plugin\\LegacyPaymentHandler\" />\n+ </type>\n</config>\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
APF-307 - move legacy transaction plugin to general di.xml because it needs to run for cron as well
21,241
16.02.2021 17:49:28
21,600
61bcbb6c0d34250a8b8a6949c2b2fd87226b5eae
Update CHANGELOG for re-submission of 5.0.0
[ { "change_type": "MODIFY", "old_path": "CHANGELOG.md", "new_path": "CHANGELOG.md", "diff": "# Change Log\n-## <new version>\n-* Fixes product page button hover and tooltip button placement\n-\n## 5.0.0\n* General Availability release, replacing versions that were previously included in core Magento releases\n* Fixed creating a credit memo against a split capture invoice\n* Fixed loading correct config when switching store view before a cart is initiated\n* Changed the button to create the session directly instead of through Magento\n* Removed redirect to cart on login if the customer has products in cart\n+* Fixed product page button hover and tooltip button placement\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
Update CHANGELOG for re-submission of 5.0.0
21,270
17.02.2021 12:26:30
28,800
101087e49fc33a3e672c1ba1c31e3f03b5e1f768
2.4 test for multi auth capture initiated
[ { "change_type": "MODIFY", "old_path": "Test/Mftf-24/Data/AmazonPaymentConfigData.xml", "new_path": "Test/Mftf-24/Data/AmazonPaymentConfigData.xml", "diff": "<entity name=\"SampleAmazonPaymentLwaDisabled\" type=\"lwa_enabled\">\n<data key=\"value\">0</data>\n</entity>\n+ <entity name=\"SampleAmazonPaymentPaymentAction\" type=\"payment_action_v2\">\n+ <data key=\"charge_on_shipment\">authorize</data>\n+ <data key=\"charge_on_order\">authorize_capture</data>\n+ </entity>\n+ <entity name=\"SampleAmazonPaymentAuthorizationMode\" type=\"authorization_mode\">\n+ <data key=\"immediate\">synchronous</data>\n+ <data key=\"automatic\">synchronous_possible</data>\n+ </entity>\n<entity name=\"EUAmazonPaymentConfig\" type=\"amazon_payment_config\">\n<requiredEntity type=\"api_version\">SampleAmazonPaymentApiVersion</requiredEntity>\n" }, { "change_type": "ADD", "old_path": null, "new_path": "Test/Mftf-24/Data/AmazonSimulationStringsData.xml", "diff": "+<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n+<entities xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd\">\n+ <entity name=\"AmazonSimulationString\" type=\"amazon_simulation_string\">\n+ <data key=\"capture_initiated\">{&quot;x-amz-pay-simulation-code&quot;:&quot;CaptureInitiated&quot;}</data>\n+ </entity>\n+</entities>\n" }, { "change_type": "ADD", "old_path": null, "new_path": "Test/Mftf-24/Test/AmazonCheckoutOrderTwoItems.xml", "diff": "+<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n+<tests xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"urn:magento:mftf:Test/etc/testSchema.xsd\">\n+ <test name=\"AmazonCheckoutOrderTwoItems\">\n+ <annotations>\n+ <stories value=\"Amazon Pay Checkout Order Two Items\"/>\n+ <title value=\"Customer purchases two items\"/>\n+ <description value=\"Customer purchases two items\"/>\n+ <severity value=\"CRITICAL\"/>\n+ <group value=\"amazon_pay\"/>\n+ <group value=\"amazon_pay_invoice\"/>\n+ </annotations>\n+\n+ <before>\n+ <createData entity=\"SampleAmazonPaymentConfig\" stepKey=\"SampleAmazonPaymentConfigData\"/>\n+ <createData entity=\"SimpleTwo\" stepKey=\"createSimpleProduct\"/>\n+ <createData entity=\"SimpleTwo\" stepKey=\"createSimpleProduct2\"/>\n+ <magentoCLI command=\"config:set payment/amazon_payment/authorization_mode {{SampleAmazonPaymentAuthorizationMode.automatic}}\" stepKey=\"AuthorizationModeAutomatic\"/>\n+ <magentoCLI command=\"config:set {{AmazonButtonPaymentConfig.path}} 1\" stepKey=\"displayAmazonButtonPayment\"/>\n+ <magentoCLI command=\"cache:flush\" stepKey=\"flushCache\"/>\n+ </before>\n+\n+ <after>\n+ <magentoCLI command=\"config:set payment/amazon_payment/authorization_mode {{SampleAmazonPaymentAuthorizationMode.immediate}}\" stepKey=\"AuthorizationModeImmediate\"/>\n+ <magentoCLI command=\"cache:flush\" stepKey=\"flushCache\"/>\n+ </after>\n+\n+ <!--Go to product page-->\n+ <actionGroup ref=\"StorefrontOpenProductPageActionGroup\" stepKey=\"openProductStoreFront\">\n+ <argument name=\"productUrl\" value=\"$$createSimpleProduct.custom_attributes[url_key]$$\"/>\n+ </actionGroup>\n+ <!--Click on Add To Cart button-->\n+ <actionGroup ref=\"StorefrontAddToTheCartActionGroup\" stepKey=\"clickOnAddToCartButton\"/>\n+ <!-- Go to product 2 page and add to cart -->\n+ <actionGroup ref=\"StorefrontOpenProductPageActionGroup\" stepKey=\"openProduct2StoreFront\">\n+ <argument name=\"productUrl\" value=\"$$createSimpleProduct2.custom_attributes[url_key]$$\"/>\n+ </actionGroup>\n+ <actionGroup ref=\"StorefrontAddToTheCartActionGroup\" stepKey=\"addProduct2ToCart\"/>\n+\n+ <!--Go to checkout-->\n+ <actionGroup ref=\"GoToCheckoutFromMinicartActionGroup\" stepKey=\"goToCheckoutFromMiniCart\"/>\n+\n+ <!--Go to Amazon Pay and login-->\n+ <click selector=\"{{AmazonButtonSection.checkout}}\" stepKey=\"clickAmazonButton\"/>\n+ <actionGroup ref=\"AmazonLoginActionGroup\" stepKey=\"AmazonLoginActionGroup\"/>\n+ <!--Come back to checkout with default address-->\n+ <actionGroup ref=\"AmazonCheckoutActionGroup\" stepKey=\"DefaultAmazonCheckoutActionGroup\"/>\n+ <!--Go to payment method-->\n+ <click selector=\"{{CheckoutShippingSection.next}}\" stepKey=\"clickCheckoutShippingNext\"/>\n+ <waitForPageLoad stepKey=\"waitForCheckoutPaymentPageLoad\"/>\n+ <!--Verify only Amazon Pay method is visible-->\n+ <seeNumberOfElements selector=\"{{CheckoutPaymentSection.availablePaymentSolutions}}\" userInput=\"1\" stepKey=\"seeSingleAvailablePaymentSolution\"/>\n+ <seeElement selector=\"{{AmazonCheckoutSection.method}}\" stepKey=\"seeAmazonPaymentMethod\"/>\n+ <!--Place order-->\n+ <actionGroup ref=\"CheckoutPlaceOrderActionGroup\" stepKey=\"guestPlaceorder\">\n+ <argument name=\"orderNumberMessage\" value=\"CONST.successGuestCheckoutOrderNumberMessage\" />\n+ <argument name=\"emailYouMessage\" value=\"CONST.successCheckoutEmailYouMessage\" />\n+ </actionGroup>\n+ <grabTextFrom selector=\"{{CheckoutSuccessMainSection.orderNumber}}\" stepKey=\"grabOrderNumber\"/>\n+ </test>\n+</tests>\n" }, { "change_type": "ADD", "old_path": null, "new_path": "Test/Mftf-24/Test/AmazonInvoiceMultipleCaptureInitiated.xml", "diff": "+<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n+<tests xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"urn:magento:mftf:Test/etc/testSchema.xsd\">\n+ <test name=\"AmazonInvoiceMultipleCaptureInitiated\" extends=\"AmazonCheckoutOrderTwoItems\">\n+ <annotations>\n+ <stories value=\"Amazon Pay Multiple Capture Initiated\"/>\n+ <title value=\"Admin user must be able to capture multiple times when configuration allows, after 7 days\"/>\n+ <description value=\"Admin user must be able to capture multiple times when configuration allows, after 7 days\"/>\n+ <severity value=\"CRITICAL\"/>\n+ <group value=\"amazon_pay\"/>\n+ <group value=\"amazon_pay_invoice\"/>\n+ </annotations>\n+\n+ <!-- Login as admin -->\n+ <actionGroup ref=\"AdminLoginActionGroup\" stepKey=\"loginAsAdmin\"/>\n+\n+ <!-- Open created order in backend -->\n+ <amOnPage url=\"{{AdminOrdersPage.url}}\" stepKey=\"goToOrders\"/>\n+ <waitForPageLoad stepKey=\"waitForOrdersPageLoad\"/>\n+ <actionGroup ref=\"OpenOrderByIdActionGroup\" stepKey=\"filterOrderGridById\">\n+ <argument name=\"orderId\" value=\"$grabOrderNumber\"/>\n+ </actionGroup>\n+ <grabFromCurrentUrl regex=\"~/order_id/(\\d+)/~\" stepKey=\"grabOrderId\"/>\n+\n+ <!-- Create Invoice 1 -->\n+ <click selector=\"{{AdminOrderDetailsMainActionsSection.invoice}}\" stepKey=\"clickInvoice1\"/>\n+ <waitForPageLoad stepKey=\"waitForInvoicePage1\"/>\n+ <fillField stepKey=\"fillQty\" userInput=\"1\" selector=\"{{AdminInvoiceItemsSection.itemQtyToInvoice('1')}}\"/>\n+ <fillField stepKey=\"fillNoQty\" userInput=\"0\" selector=\"{{AdminInvoiceItemsSection.itemQtyToInvoice('2')}}\"/>\n+ <click selector=\"{{AdminInvoiceItemsSection.updateQty}}\" stepKey=\"updateQty\"/>\n+ <waitForPageLoad stepKey=\"waitPageToBeLoaded\"/>\n+ <!--Add simulation string-->\n+ <fillField selector=\"{{AdminInvoiceTotalSection.invoiceComment}}\" userInput=\"{{AmazonSimulationString.capture_initiated}}\" stepKey=\"writeComment\"/>\n+ <click selector=\"{{AdminInvoiceMainActionsSection.submitInvoice}}\" stepKey=\"submitInvoice1\"/>\n+ <waitForPageLoad stepKey=\"waitForLoadPage1\"/>\n+ <see userInput=\"The invoice has been created.\" stepKey=\"seeMessage1\"/>\n+ <!--Verify order status is Payment Review-->\n+ <see selector=\"{{AdminOrderDetailsInformationSection.orderStatus}}\" userInput=\"Payment Review\" stepKey=\"seePaymentReviewStatus\"/>\n+ <!--Update status-->\n+ <wait time=\"30\" stepKey=\"waitForStatusUpdate\"/>\n+ <magentoCLI command=\"amazon:payment:async:process\" stepKey=\"updateStatus\"/>\n+ <!--Open order and verify status is Processing-->\n+ <actionGroup ref=\"AdminOpenOrderByEntityIdActionGroup\" stepKey=\"openOrder\">\n+ <argument name=\"entityId\" value=\"{$grabOrderId}\"/>\n+ </actionGroup>\n+ <see selector=\"{{AdminOrderDetailsInformationSection.orderStatus}}\" userInput=\"Processing\" stepKey=\"seeProcessingStatus\"/>\n+\n+ <!-- Create Invoice 2 -->\n+ <click selector=\"{{AdminOrderDetailsMainActionsSection.invoice}}\" stepKey=\"clickInvoice2\"/>\n+ <waitForPageLoad stepKey=\"waitForInvoicePage2\"/>\n+ <click selector=\"{{AdminInvoiceMainActionsSection.submitInvoice}}\" stepKey=\"submitInvoice2\"/>\n+ <waitForPageLoad stepKey=\"waitForLoadPage2\"/>\n+ <see userInput=\"The invoice has been created.\" stepKey=\"seeMessage2\"/>\n+ </test>\n+</tests>\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
ASD-570 2.4 test for multi auth capture initiated
21,270
17.02.2021 12:28:59
28,800
7d6e536261a8bd016973afba9086c1906ba896a0
2.4 basic refund test
[ { "change_type": "ADD", "old_path": null, "new_path": "Test/Mftf-24/Test/AmazonRefund.xml", "diff": "+<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n+<tests xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"urn:magento:mftf:Test/etc/testSchema.xsd\">\n+ <test name=\"AmazonRefund\" extends=\"AmazonCheckoutButton\">\n+ <annotations>\n+ <stories value=\"Amazon Refund\"/>\n+ <title value=\"Amazon Refund\"/>\n+ <description value=\"User should be able to create refund.\"/>\n+ <severity value=\"CRITICAL\"/>\n+ <group value=\"amazon_pay\"/>\n+ <group value=\"amazon_pay_invoice\"/>\n+ </annotations>\n+\n+ <!--Go to Amazon Pay from the checkout and login-->\n+ <click selector=\"{{AmazonButtonSection.checkout}}\" stepKey=\"clickAmazonButton\"/>\n+ <actionGroup ref=\"AmazonLoginActionGroup\" stepKey=\"AmazonLoginActionGroup\"/>\n+ <!--Come back to checkout with default address-->\n+ <actionGroup ref=\"AmazonCheckoutActionGroup\" stepKey=\"DefaultAmazonCheckoutActionGroup\"/>\n+ <!--Go to payment method-->\n+ <click selector=\"{{CheckoutShippingSection.next}}\" stepKey=\"clickCheckoutShippingNext\"/>\n+ <waitForPageLoad stepKey=\"waitForCheckoutPaymentPageLoad\"/>\n+ <!--Verify Amazon Pay method is visible-->\n+ <seeNumberOfElements selector=\"{{CheckoutPaymentSection.availablePaymentSolutions}}\" userInput=\"1\" stepKey=\"seeSingleAvailablePaymentSolution\"/>\n+ <!--Place order-->\n+ <actionGroup ref=\"CheckoutPlaceOrderActionGroup\" stepKey=\"guestPlaceorder\">\n+ <argument name=\"orderNumberMessage\" value=\"CONST.successGuestCheckoutOrderNumberMessage\" />\n+ <argument name=\"emailYouMessage\" value=\"CONST.successCheckoutEmailYouMessage\" />\n+ </actionGroup>\n+ <grabTextFrom selector=\"{{CheckoutSuccessMainSection.orderNumber}}\" stepKey=\"grabOrderNumber\"/>\n+ <!--Login as admin-->\n+ <actionGroup ref=\"AdminLoginActionGroup\" stepKey=\"loginAsAdmin\"/>\n+ <!--Open created order in backend-->\n+ <amOnPage url=\"{{AdminOrdersPage.url}}\" stepKey=\"goToOrders\"/>\n+ <waitForPageLoad stepKey=\"waitForOrdersPageLoad\"/>\n+ <actionGroup ref=\"OpenOrderByIdActionGroup\" stepKey=\"filterOrderGridById\">\n+ <argument name=\"orderId\" value=\"$grabOrderNumber\"/>\n+ </actionGroup>\n+ <!--Create Invoice-->\n+ <click selector=\"{{AdminOrderDetailsMainActionsSection.invoice}}\" stepKey=\"clickInvoice\"/>\n+ <waitForPageLoad stepKey=\"waitForInvoicePage\"/>\n+ <!--Submit and verify the invoice created-->\n+ <click selector=\"{{AdminInvoiceMainActionsSection.submitInvoice}}\" stepKey=\"submitInvoice\"/>\n+ <waitForPageLoad stepKey=\"waitForLoadPage\"/>\n+ <see userInput=\"The invoice has been created.\" stepKey=\"seeMessage\"/>\n+ <!--Go to created invoice-->\n+ <click selector=\"{{AdminOrderDetailsOrderViewSection.invoices}}\" stepKey=\"clickInvoicesTab\"/>\n+ <waitForPageLoad stepKey=\"waitForInvoicesPageLoad\"/>\n+ <seeElement selector=\"{{AdminOrderInvoicesTabSection.gridRow('1')}}\" stepKey=\"seeInvoiceInGrid\"/>\n+ <click selector=\"{{AdminOrderInvoicesTabSection.viewInvoice}}\" stepKey=\"openInvoicePage\"/>\n+ <waitForPageLoad stepKey=\"waitForInvoicePageLoad\"/>\n+ <!--Submit refund and verify the refund was successful-->\n+ <click selector=\"{{AdminInvoiceMainActionsSection.openNewCreditMemoFromInvoice}}\" stepKey=\"clickCreateCreditMemo\"/>\n+ <waitForPageLoad stepKey=\"waitForCreditMemoPageLoad\"/>\n+ <!-- adding the raw selector here as the Magento provided one is incorrect -->\n+ <click selector=\".action-default.scalable.save.submit-button.refund.primary\" stepKey=\"submitRefund\"/>\n+ <see userInput=\"Amazon Pay refund successful.\" stepKey=\"seeAmazonMessage\"/>\n+ <see userInput=\"You created the credit memo.\" stepKey=\"seeMagentoMessage\"/>\n+ </test>\n+</tests>\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
ASD-570 2.4 basic refund test
21,270
17.02.2021 13:47:03
28,800
985cb643f514b3ef8363773c1b505334632a8b50
2.4 adds test for multi auth refund
[ { "change_type": "ADD", "old_path": null, "new_path": "Test/Mftf-24/Test/AmazonRefundMultiAuth.xml", "diff": "+<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n+<tests xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"urn:magento:mftf:Test/etc/testSchema.xsd\">\n+ <test name=\"AmazonRefundMultiAuth\" extends=\"AmazonCheckoutOrderTwoItems\">\n+ <annotations>\n+ <stories value=\"Amazon Pay Refund Multi Auth\"/>\n+ <title value=\"Admin user must be able to refund multiple times when configuration allows\"/>\n+ <description value=\"Admin user must be able to refund multiple times when configuration allows\"/>\n+ <severity value=\"CRITICAL\"/>\n+ <group value=\"amazon_pay\"/>\n+ <group value=\"amazon_pay_invoice\"/>\n+ </annotations>\n+\n+ <!-- Login as admin -->\n+ <actionGroup ref=\"AdminLoginActionGroup\" stepKey=\"loginAsAdmin\"/>\n+\n+ <!-- Open created order in backend -->\n+ <amOnPage url=\"{{AdminOrdersPage.url}}\" stepKey=\"goToOrders\"/>\n+ <waitForPageLoad stepKey=\"waitForOrdersPageLoad\"/>\n+ <actionGroup ref=\"OpenOrderByIdActionGroup\" stepKey=\"filterOrderGridById\">\n+ <argument name=\"orderId\" value=\"$grabOrderNumber\"/>\n+ </actionGroup>\n+ <grabFromCurrentUrl regex=\"~/order_id/(\\d+)/~\" stepKey=\"grabOrderId\"/>\n+\n+ <!-- Create Invoice 1 -->\n+ <click selector=\"{{AdminOrderDetailsMainActionsSection.invoice}}\" stepKey=\"clickInvoice1\"/>\n+ <waitForPageLoad stepKey=\"waitForInvoicePage1\"/>\n+ <fillField stepKey=\"fillQty\" userInput=\"1\" selector=\"{{AdminInvoiceItemsSection.itemQtyToInvoice('1')}}\"/>\n+ <fillField stepKey=\"fillNoQty\" userInput=\"0\" selector=\"{{AdminInvoiceItemsSection.itemQtyToInvoice('2')}}\"/>\n+ <click selector=\"{{AdminInvoiceItemsSection.updateQty}}\" stepKey=\"updateQty\"/>\n+ <waitForPageLoad stepKey=\"waitPageToBeLoaded\"/>\n+ <click selector=\"{{AdminInvoiceMainActionsSection.submitInvoice}}\" stepKey=\"submitInvoice1\"/>\n+ <waitForPageLoad stepKey=\"waitForLoadPage1\"/>\n+ <see userInput=\"The invoice has been created.\" stepKey=\"seeMessage1\"/>\n+\n+ <!-- Create Invoice 2 -->\n+ <click selector=\"{{AdminOrderDetailsMainActionsSection.invoice}}\" stepKey=\"clickInvoice2\"/>\n+ <waitForPageLoad stepKey=\"waitForInvoicePage2\"/>\n+ <click selector=\"{{AdminInvoiceMainActionsSection.submitInvoice}}\" stepKey=\"submitInvoice2\"/>\n+ <waitForPageLoad stepKey=\"waitForLoadPage2\"/>\n+ <see userInput=\"The invoice has been created.\" stepKey=\"seeMessage2\"/>\n+\n+ <!--Go to first created invoice-->\n+ <click selector=\"{{AdminOrderDetailsOrderViewSection.invoices}}\" stepKey=\"clickInvoicesTab\"/>\n+ <waitForPageLoad stepKey=\"waitForInvoicesPageLoad\"/>\n+ <seeElement selector=\"{{AdminOrderInvoicesTabSection.gridRow('1')}}\" stepKey=\"seeInvoiceInGrid\"/>\n+ <click selector=\"{{AdminOrderInvoicesTabSection.viewGridRow('1')}}\" stepKey=\"openInvoicePage\"/>\n+ <waitForPageLoad stepKey=\"waitForInvoicePageLoad\"/>\n+ <!--Submit refund and verify the refund was successful-->\n+ <click selector=\"{{AdminInvoiceMainActionsSection.openNewCreditMemoFromInvoice}}\" stepKey=\"clickCreateCreditMemo\"/>\n+ <waitForPageLoad stepKey=\"waitForCreditMemoPageLoad\"/>\n+ <!-- adding the raw selector here as the Magento provided one is incorrect -->\n+ <click selector=\".action-default.scalable.save.submit-button.refund.primary\" stepKey=\"submitRefund\"/>\n+ <see userInput=\"Amazon Pay refund successful.\" stepKey=\"seeAmazonMessage\"/>\n+ <see userInput=\"You created the credit memo.\" stepKey=\"seeMagentoMessage\"/>\n+\n+ <!--Go to second created invoice-->\n+ <click selector=\"{{AdminOrderDetailsOrderViewSection.invoices}}\" stepKey=\"clickInvoicesTab2\"/>\n+ <waitForPageLoad stepKey=\"waitForInvoicesPageLoad2\"/>\n+ <seeElement selector=\"{{AdminOrderInvoicesTabSection.gridRow('2')}}\" stepKey=\"seeInvoiceInGrid2\"/>\n+ <click selector=\"{{AdminOrderInvoicesTabSection.viewGridRow('2')}}\" stepKey=\"openInvoicePage2\"/>\n+ <waitForPageLoad stepKey=\"waitForInvoicePageLoad2\"/>\n+ <!--Submit refund and verify the refund was successful-->\n+ <click selector=\"{{AdminInvoiceMainActionsSection.openNewCreditMemoFromInvoice}}\" stepKey=\"clickCreateCreditMemo2\"/>\n+ <waitForPageLoad stepKey=\"waitForCreditMemoPageLoad2\"/>\n+ <!-- adding the raw selector here as the Magento provided one is incorrect -->\n+ <click selector=\".action-default.scalable.save.submit-button.refund.primary\" stepKey=\"submitRefund2\"/>\n+ <see userInput=\"Amazon Pay refund successful.\" stepKey=\"seeAmazonMessage2\"/>\n+ <see userInput=\"You created the credit memo.\" stepKey=\"seeMagentoMessage2\"/>\n+ </test>\n+</tests>\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
ASD-570 2.4 adds test for multi auth refund
21,264
18.02.2021 18:38:25
0
e97ab3a9f8b28368f69419aa98c47f0f5572f635
Minor changes to README.md and Beta callout
[ { "change_type": "MODIFY", "old_path": "README.md", "new_path": "README.md", "diff": "@@ -5,9 +5,9 @@ This extension provides an official integration of your Magento 2 store with **A\nAmazon Pay offers a familiar and convenient buying experience that can help your customers spend more time shopping and less time checking out. Amazon Pay is used by large and small companies. From years of shopping safely with Amazon, customers trust their personal information will remain secure and know many transactions are covered by the Amazon A-to-z Guarantee. Businesses have the reassurance of our advanced fraud protection and payment protection policy.\n## What's new in Amazon Pay for Magento 2?\n-Starting from version 5.0.0, Amazon Pay is hosted on Magento Marketplace and features our next generation web checkout technology. This places the Amazon shipping and payment widgets outside the Magento checkout template system, improving usability and transaction error handling. Here are some of the improvements over the previous module:\n+Starting from version 5.0.0, Amazon Pay is hosted on the Magento Marketplace and features our next generation web checkout technology. This places the Amazon shipping and payment widgets outside the Magento checkout template system, improving usability and transaction error handling. Here are some of the improvements over the previous module:\n-* Hosted checkout experience (replacing inline widgets solution)\n+* An Amazon-Hosted checkout experience (replacing inline widgets solution)\n* Fewer checkout steps (merging consent and address/payment selection screen)\n* Avoids problems on browsers that have active cookie blocking or tracking protection mechanisms\n* Supports digital goods as well as physical goods\n@@ -19,7 +19,7 @@ Starting from version 5.0.0, Amazon Pay is hosted on Magento Marketplace and fea\n* _Amazon Pay_ button in the shopping cart, mini-cart, on product pages and in the 1st step of checkout\n* _Amazon Sign-in_ optional button on customer login and registration page\n* _Amazon Pay_ in the list of available payment methods during the final step of checkout\n-* Configuration of _Amazon Pay_ extension from within Magento admin\n+* Configuration of _Amazon Pay_ extension from within Magento Admin\n* Support for payment authorizations, captures and refunds (also partial refunds)\n* Support for synchronous and asynchronous authorization mode\n* Supports _Amazon Pay_ Instant Payment Notifications\n@@ -40,6 +40,8 @@ Starting from version 5.0.0, Amazon Pay is hosted on Magento Marketplace and fea\n* A verified Amazon Pay merchant account - [sign up here](https://pay.amazon.com/signup)!\n## Installation and Configuration\n+> :warning: Please note that the 5.0.X Release series is currently in Beta, due to the significant re-working of our extension to be completely stand-alone from previous versions. Please report any issues you may have with this extension to us by submitting a GitHub Issue!\n+\nThe extension is available via composer as *amzn/amazon-payments-magento-2-plugin*. It will also soon be available as *amzn/amazon-pay-magento-2-module* or in [Magento Marketplace](https://marketplace.magento.com/amzn-amazon-pay-magento-2-module.html). The User Guide can be found [here](https://amzn.github.io/amazon-payments-magento-2-plugin/). Any previous module versions should be removed. Please refer to the [Installation](https://amzn.github.io/amazon-payments-magento-2-plugin/installation.html) section of our guide to get more details concerning installation procedure.\n## Branch information\n@@ -52,10 +54,10 @@ Magento Version | Github Branch | Latest release\n## Release Notes\n### 5.0.0\n-* General Availability release, replacing versions that were previously included in core Magento releases\n-* Fixed creating a credit memo against a split capture invoice\n-* Added input validation and test upon saving for credentials\n-* Changed calling `closeChargePermission` instead of `cancelCharge` when voiding an order\n-* Fixed loading correct config when switching store view before a cart is initiated\n-* Changed the button to create the session directly instead of through Magento\n-* Removed redirect to cart on login if the customer has products in cart\n+* Beta release, replacing all versions that were included as part of the \"Vendor Bundled Extension\" (VBE) program in previous Magento releases.\n+* Fixed creating a credit memo against a split capture invoice.\n+* Added input validation and test upon saving for credentials.\n+* Changed calling `closeChargePermission` instead of `cancelCharge` when voiding an order.\n+* Fixed loading correct config when switching store view before a cart is initiated.\n+* Changed the button to create the session directly instead of through Magento.\n+* Removed redirect to cart on login if the customer has products in cart.\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
Minor changes to README.md and Beta callout
21,241
18.02.2021 14:49:26
21,600
9a33948848bca66dddd701e919bac5ccb5f823a0
Refer to CHANGELOG.md for release notes
[ { "change_type": "MODIFY", "old_path": "README.md", "new_path": "README.md", "diff": "@@ -51,11 +51,4 @@ Magento Version | Github Branch | Latest release\n2.3.0 - 2.4.x | [master](https://github.com/amzn/amazon-payments-magento-2-plugin/tree/master) | 5.0.1\n## Release Notes\n-### 5.0.0\n-* General Availability release, replacing versions that were previously included in core Magento releases\n-* Fixed creating a credit memo against a split capture invoice\n-* Added input validation and test upon saving for credentials\n-* Changed calling `closeChargePermission` instead of `cancelCharge` when voiding an order\n-* Fixed loading correct config when switching store view before a cart is initiated\n-* Changed the button to create the session directly instead of through Magento\n-* Removed redirect to cart on login if the customer has products in cart\n+See [CHANGELOG.md](/CHANGELOG.md)\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
Refer to CHANGELOG.md for release notes
21,264
18.02.2021 21:02:30
0
56f21a735a8c0f0722a8a6f9dba945e614a153fd
Add GH Issues link.
[ { "change_type": "MODIFY", "old_path": "README.md", "new_path": "README.md", "diff": "@@ -40,7 +40,7 @@ Starting from version 5.0.0, Amazon Pay is hosted on the Magento Marketplace and\n* A verified Amazon Pay merchant account - [sign up here](https://pay.amazon.com/signup)!\n## Installation and Configuration\n-> :warning: Please note that the 5.0.X Release series is currently in Beta, due to the significant re-working of our extension to be completely stand-alone from previous versions. Please report any issues you may have with this extension to us by submitting a GitHub Issue!\n+> :warning: Please note that the 5.0.X Release series is currently in Beta, due to the significant re-working of our extension to be completely stand-alone from previous versions. Please report any issues you may have with this extension to us by submitting a [GitHub Issue](https://github.com/amzn/amazon-payments-magento-2-plugin/issues/new)!\nThe extension is available via composer as *amzn/amazon-payments-magento-2-plugin*. It will also soon be available as *amzn/amazon-pay-magento-2-module* or in [Magento Marketplace](https://marketplace.magento.com/amzn-amazon-pay-magento-2-module.html). The User Guide can be found [here](https://amzn.github.io/amazon-payments-magento-2-plugin/). Any previous module versions should be removed. Please refer to the [Installation](https://amzn.github.io/amazon-payments-magento-2-plugin/installation.html) section of our guide to get more details concerning installation procedure.\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
Add GH Issues link.
21,241
18.02.2021 16:47:57
21,600
f5ee7f73dea4555231f9ce7f74ec20c820e2004a
Remove di entry for removed plugin
[ { "change_type": "MODIFY", "old_path": "etc/frontend/di.xml", "new_path": "etc/frontend/di.xml", "diff": "<type name=\"Magento\\Checkout\\Block\\Checkout\\LayoutProcessor\">\n<plugin name=\"amazon_pay_checkout_processor\" type=\"Amazon\\Pay\\Plugin\\CheckoutProcessor\" />\n</type>\n- <type name=\"Amazon\\Core\\Helper\\Data\">\n- <plugin name=\"amazon_pay_amazon_core_helper\" type=\"Amazon\\Pay\\Plugin\\AmazonCoreHelperData\" sortOrder=\"1\" />\n- </type>\n</config>\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
Remove di entry for removed plugin
21,270
18.02.2021 16:23:14
28,800
2a5459085073ba94475d87702cfefb4ce98ce792
ported new tests to Magento 2.3
[ { "change_type": "MODIFY", "old_path": "Test/Mftf-23/Data/AmazonPaymentConfigData.xml", "new_path": "Test/Mftf-23/Data/AmazonPaymentConfigData.xml", "diff": "<entity name=\"SampleAmazonPaymentLwaDisabled\" type=\"lwa_enabled\">\n<data key=\"value\">0</data>\n</entity>\n+ <entity name=\"SampleAmazonPaymentPaymentAction\" type=\"payment_action_v2\">\n+ <data key=\"charge_on_shipment\">authorize</data>\n+ <data key=\"charge_on_order\">authorize_capture</data>\n+ </entity>\n+ <entity name=\"SampleAmazonPaymentAuthorizationMode\" type=\"authorization_mode\">\n+ <data key=\"immediate\">synchronous</data>\n+ <data key=\"automatic\">synchronous_possible</data>\n+ </entity>\n<entity name=\"EUAmazonPaymentConfig\" type=\"amazon_payment_config\">\n<requiredEntity type=\"api_version\">SampleAmazonPaymentApiVersion</requiredEntity>\n" }, { "change_type": "ADD", "old_path": null, "new_path": "Test/Mftf-23/Data/AmazonSimulationStringsData.xml", "diff": "+<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n+<entities xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd\">\n+ <entity name=\"AmazonSimulationString\" type=\"amazon_simulation_string\">\n+ <data key=\"capture_initiated\">{&quot;x-amz-pay-simulation-code&quot;:&quot;CaptureInitiated&quot;}</data>\n+ </entity>\n+</entities>\n" }, { "change_type": "ADD", "old_path": null, "new_path": "Test/Mftf-23/Test/AmazonCheckoutOrderTwoItems.xml", "diff": "+<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n+<tests xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"urn:magento:mftf:Test/etc/testSchema.xsd\">\n+ <test name=\"AmazonCheckoutOrderTwoItems\">\n+ <annotations>\n+ <stories value=\"Amazon Pay Checkout Order Two Items\"/>\n+ <title value=\"Customer purchases two items\"/>\n+ <description value=\"Customer purchases two items\"/>\n+ <severity value=\"CRITICAL\"/>\n+ <group value=\"amazon_pay\"/>\n+ <group value=\"amazon_pay_invoice\"/>\n+ </annotations>\n+\n+ <before>\n+ <createData entity=\"SampleAmazonPaymentConfig\" stepKey=\"SampleAmazonPaymentConfigData\"/>\n+ <createData entity=\"SimpleTwo\" stepKey=\"createSimpleProduct\"/>\n+ <createData entity=\"SimpleTwo\" stepKey=\"createSimpleProduct2\"/>\n+ <magentoCLI command=\"config:set payment/amazon_payment/authorization_mode {{SampleAmazonPaymentAuthorizationMode.automatic}}\" stepKey=\"AuthorizationModeAutomatic\"/>\n+ <magentoCLI command=\"config:set {{AmazonButtonPaymentConfig.path}} 1\" stepKey=\"displayAmazonButtonPayment\"/>\n+ <magentoCLI command=\"cache:flush\" stepKey=\"flushCache\"/>\n+ </before>\n+\n+ <after>\n+ <magentoCLI command=\"config:set payment/amazon_payment/authorization_mode {{SampleAmazonPaymentAuthorizationMode.immediate}}\" stepKey=\"AuthorizationModeImmediate\"/>\n+ <magentoCLI command=\"cache:flush\" stepKey=\"flushCache\"/>\n+ </after>\n+\n+ <!--Go to product page-->\n+ <actionGroup ref=\"StorefrontOpenProductPageActionGroup\" stepKey=\"openProductStoreFront\">\n+ <argument name=\"productUrl\" value=\"$$createSimpleProduct.custom_attributes[url_key]$$\"/>\n+ </actionGroup>\n+ <!--Click on Add To Cart button-->\n+ <actionGroup ref=\"StorefrontAddToTheCartActionGroup\" stepKey=\"clickOnAddToCartButton\"/>\n+ <!-- Go to product 2 page and add to cart -->\n+ <actionGroup ref=\"StorefrontOpenProductPageActionGroup\" stepKey=\"openProduct2StoreFront\">\n+ <argument name=\"productUrl\" value=\"$$createSimpleProduct2.custom_attributes[url_key]$$\"/>\n+ </actionGroup>\n+ <actionGroup ref=\"StorefrontAddToTheCartActionGroup\" stepKey=\"addProduct2ToCart\"/>\n+\n+ <!--Go to checkout-->\n+ <actionGroup ref=\"GoToCheckoutFromMinicartActionGroup\" stepKey=\"goToCheckoutFromMiniCart\"/>\n+\n+ <!--Go to Amazon Pay and login-->\n+ <click selector=\"{{AmazonButtonSection.checkout}}\" stepKey=\"clickAmazonButton\"/>\n+ <actionGroup ref=\"AmazonLoginActionGroup\" stepKey=\"AmazonLoginActionGroup\"/>\n+ <!--Come back to checkout with default address-->\n+ <actionGroup ref=\"AmazonCheckoutActionGroup\" stepKey=\"DefaultAmazonCheckoutActionGroup\"/>\n+ <!--Go to payment method-->\n+ <click selector=\"{{CheckoutShippingSection.next}}\" stepKey=\"clickCheckoutShippingNext\"/>\n+ <waitForPageLoad stepKey=\"waitForCheckoutPaymentPageLoad\"/>\n+ <!--Verify only Amazon Pay method is visible-->\n+ <seeNumberOfElements selector=\"{{CheckoutPaymentSection.availablePaymentSolutions}}\" userInput=\"1\" stepKey=\"seeSingleAvailablePaymentSolution\"/>\n+ <seeElement selector=\"{{AmazonCheckoutSection.method}}\" stepKey=\"seeAmazonPaymentMethod\"/>\n+ <!--Place order-->\n+ <actionGroup ref=\"CheckoutPlaceOrderActionGroup\" stepKey=\"guestPlaceorder\">\n+ <argument name=\"orderNumberMessage\" value=\"CONST.successGuestCheckoutOrderNumberMessage\" />\n+ <argument name=\"emailYouMessage\" value=\"CONST.successCheckoutEmailYouMessage\" />\n+ </actionGroup>\n+ <grabTextFrom selector=\"{{CheckoutSuccessMainSection.orderNumber}}\" stepKey=\"grabOrderNumber\"/>\n+ </test>\n+</tests>\n" }, { "change_type": "ADD", "old_path": null, "new_path": "Test/Mftf-23/Test/AmazonInvoiceMultipleCaptureInitiated.xml", "diff": "+<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n+<tests xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"urn:magento:mftf:Test/etc/testSchema.xsd\">\n+ <test name=\"AmazonInvoiceMultipleCaptureInitiated\" extends=\"AmazonCheckoutOrderTwoItems\">\n+ <annotations>\n+ <stories value=\"Amazon Pay Multiple Capture Initiated\"/>\n+ <title value=\"Admin user must be able to capture multiple times when configuration allows, after 7 days\"/>\n+ <description value=\"Admin user must be able to capture multiple times when configuration allows, after 7 days\"/>\n+ <severity value=\"CRITICAL\"/>\n+ <group value=\"amazon_pay\"/>\n+ <group value=\"amazon_pay_invoice\"/>\n+ </annotations>\n+\n+ <!-- Login as admin -->\n+ <actionGroup ref=\"LoginAsAdmin\" stepKey=\"loginAsAdmin\"/>\n+\n+ <!-- Open created order in backend -->\n+ <amOnPage url=\"{{AdminOrdersPage.url}}\" stepKey=\"goToOrders\"/>\n+ <waitForPageLoad stepKey=\"waitForOrdersPageLoad\"/>\n+ <actionGroup ref=\"OpenOrderById\" stepKey=\"filterOrderGridById\">\n+ <argument name=\"orderId\" value=\"$grabOrderNumber\"/>\n+ </actionGroup>\n+ <grabFromCurrentUrl regex=\"~/order_id/(\\d+)/~\" stepKey=\"grabOrderId\"/>\n+\n+ <!-- Create Invoice 1 -->\n+ <click selector=\"{{AdminOrderDetailsMainActionsSection.invoice}}\" stepKey=\"clickInvoice1\"/>\n+ <waitForPageLoad stepKey=\"waitForInvoicePage1\"/>\n+ <fillField stepKey=\"fillQty\" userInput=\"1\" selector=\"{{AdminInvoiceItemsSection.itemQtyToInvoice('1')}}\"/>\n+ <fillField stepKey=\"fillNoQty\" userInput=\"0\" selector=\"{{AdminInvoiceItemsSection.itemQtyToInvoice('2')}}\"/>\n+ <click selector=\"{{AdminInvoiceItemsSection.updateQty}}\" stepKey=\"updateQty\"/>\n+ <waitForPageLoad stepKey=\"waitPageToBeLoaded\"/>\n+ <!--Add simulation string-->\n+ <fillField selector=\"{{AdminInvoiceTotalSection.invoiceComment}}\" userInput=\"{{AmazonSimulationString.capture_initiated}}\" stepKey=\"writeComment\"/>\n+ <click selector=\"{{AdminInvoiceMainActionsSection.submitInvoice}}\" stepKey=\"submitInvoice1\"/>\n+ <waitForPageLoad stepKey=\"waitForLoadPage1\"/>\n+ <see userInput=\"The invoice has been created.\" stepKey=\"seeMessage1\"/>\n+ <!--Verify order status is Payment Review-->\n+ <see selector=\"{{AdminOrderDetailsInformationSection.orderStatus}}\" userInput=\"Payment Review\" stepKey=\"seePaymentReviewStatus\"/>\n+ <!--Update status-->\n+ <wait time=\"30\" stepKey=\"waitForStatusUpdate\"/>\n+ <magentoCLI command=\"amazon:payment:async:process\" stepKey=\"updateStatus\"/>\n+ <!--Open order and verify status is Processing-->\n+ <actionGroup ref=\"OpenOrderById\" stepKey=\"openOrder\">\n+ <argument name=\"orderId\" value=\"$grabOrderNumber\"/>\n+ </actionGroup>\n+ <see selector=\"{{AdminOrderDetailsInformationSection.orderStatus}}\" userInput=\"Processing\" stepKey=\"seeProcessingStatus\"/>\n+\n+ <!-- Create Invoice 2 -->\n+ <click selector=\"{{AdminOrderDetailsMainActionsSection.invoice}}\" stepKey=\"clickInvoice2\"/>\n+ <waitForPageLoad stepKey=\"waitForInvoicePage2\"/>\n+ <click selector=\"{{AdminInvoiceMainActionsSection.submitInvoice}}\" stepKey=\"submitInvoice2\"/>\n+ <waitForPageLoad stepKey=\"waitForLoadPage2\"/>\n+ <see userInput=\"The invoice has been created.\" stepKey=\"seeMessage2\"/>\n+ </test>\n+</tests>\n" }, { "change_type": "ADD", "old_path": null, "new_path": "Test/Mftf-23/Test/AmazonRefund.xml", "diff": "+<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n+<tests xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"urn:magento:mftf:Test/etc/testSchema.xsd\">\n+ <test name=\"AmazonRefund\" extends=\"AmazonCheckoutButton\">\n+ <annotations>\n+ <stories value=\"Amazon Refund\"/>\n+ <title value=\"Amazon Refund\"/>\n+ <description value=\"User should be able to create refund.\"/>\n+ <severity value=\"CRITICAL\"/>\n+ <group value=\"amazon_pay\"/>\n+ <group value=\"amazon_pay_invoice\"/>\n+ </annotations>\n+\n+ <!--Go to Amazon Pay from the checkout and login-->\n+ <click selector=\"{{AmazonButtonSection.checkout}}\" stepKey=\"clickAmazonButton\"/>\n+ <actionGroup ref=\"AmazonLoginActionGroup\" stepKey=\"AmazonLoginActionGroup\"/>\n+ <!--Come back to checkout with default address-->\n+ <actionGroup ref=\"AmazonCheckoutActionGroup\" stepKey=\"DefaultAmazonCheckoutActionGroup\"/>\n+ <!--Go to payment method-->\n+ <click selector=\"{{CheckoutShippingSection.next}}\" stepKey=\"clickCheckoutShippingNext\"/>\n+ <waitForPageLoad stepKey=\"waitForCheckoutPaymentPageLoad\"/>\n+ <!--Verify Amazon Pay method is visible-->\n+ <seeNumberOfElements selector=\"{{CheckoutPaymentSection.availablePaymentSolutions}}\" userInput=\"1\" stepKey=\"seeSingleAvailablePaymentSolution\"/>\n+ <!--Place order-->\n+ <actionGroup ref=\"CheckoutPlaceOrderActionGroup\" stepKey=\"guestPlaceorder\">\n+ <argument name=\"orderNumberMessage\" value=\"CONST.successGuestCheckoutOrderNumberMessage\" />\n+ <argument name=\"emailYouMessage\" value=\"CONST.successCheckoutEmailYouMessage\" />\n+ </actionGroup>\n+ <grabTextFrom selector=\"{{CheckoutSuccessMainSection.orderNumber}}\" stepKey=\"grabOrderNumber\"/>\n+ <!--Login as admin-->\n+ <actionGroup ref=\"LoginAsAdmin\" stepKey=\"loginAsAdmin\"/>\n+ <!--Open created order in backend-->\n+ <amOnPage url=\"{{AdminOrdersPage.url}}\" stepKey=\"goToOrders\"/>\n+ <waitForPageLoad stepKey=\"waitForOrdersPageLoad\"/>\n+ <actionGroup ref=\"OpenOrderById\" stepKey=\"filterOrderGridById\">\n+ <argument name=\"orderId\" value=\"$grabOrderNumber\"/>\n+ </actionGroup>\n+ <grabFromCurrentUrl regex=\"~/order_id/(\\d+)/~\" stepKey=\"grabOrderId\"/>\n+ <!--Create Invoice-->\n+ <click selector=\"{{AdminOrderDetailsMainActionsSection.invoice}}\" stepKey=\"clickInvoice\"/>\n+ <waitForPageLoad stepKey=\"waitForInvoicePage\"/>\n+ <!--Submit and verify the invoice created-->\n+ <click selector=\"{{AdminInvoiceMainActionsSection.submitInvoice}}\" stepKey=\"submitInvoice\"/>\n+ <waitForPageLoad stepKey=\"waitForLoadPage\"/>\n+ <see userInput=\"The invoice has been created.\" stepKey=\"seeMessage\"/>\n+ <!--Go to created invoice-->\n+ <click selector=\"{{AdminOrderDetailsOrderViewSection.invoices}}\" stepKey=\"clickInvoicesTab\"/>\n+ <waitForPageLoad stepKey=\"waitForInvoicesPageLoad\"/>\n+ <seeElement selector=\"{{AdminOrderInvoicesTabSection.gridRow('1')}}\" stepKey=\"seeInvoiceInGrid\"/>\n+ <click selector=\"{{AdminOrderInvoicesTabSection.viewInvoice}}\" stepKey=\"openInvoicePage\"/>\n+ <waitForPageLoad stepKey=\"waitForInvoicePageLoad\"/>\n+ <!--Submit refund and verify the refund was successful-->\n+ <click selector=\"{{AdminInvoiceMainActionsSection.openNewCreditMemoFromInvoice}}\" stepKey=\"clickCreateCreditMemo\"/>\n+ <waitForPageLoad stepKey=\"waitForCreditMemoPageLoad\"/>\n+ <!-- adding the raw selector here as the Magento provided one is incorrect -->\n+ <click selector=\".action-default.scalable.save.submit-button.refund.primary\" stepKey=\"submitRefund\"/>\n+ <see userInput=\"Amazon Pay refund successful.\" stepKey=\"seeAmazonMessage\"/>\n+ <see userInput=\"You created the credit memo.\" stepKey=\"seeMagentoMessage\"/>\n+ </test>\n+</tests>\n" }, { "change_type": "ADD", "old_path": null, "new_path": "Test/Mftf-23/Test/AmazonRefundMultiAuth.xml", "diff": "+<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n+<tests xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"urn:magento:mftf:Test/etc/testSchema.xsd\">\n+ <test name=\"AmazonRefundMultiAuth\" extends=\"AmazonCheckoutOrderTwoItems\">\n+ <annotations>\n+ <stories value=\"Amazon Pay Refund Multi Auth\"/>\n+ <title value=\"Admin user must be able to refund multiple times when configuration allows\"/>\n+ <description value=\"Admin user must be able to refund multiple times when configuration allows\"/>\n+ <severity value=\"CRITICAL\"/>\n+ <group value=\"amazon_pay\"/>\n+ <group value=\"amazon_pay_invoice\"/>\n+ </annotations>\n+\n+ <!-- Login as admin -->\n+ <actionGroup ref=\"LoginAsAdmin\" stepKey=\"loginAsAdmin\"/>\n+\n+ <!-- Open created order in backend -->\n+ <amOnPage url=\"{{AdminOrdersPage.url}}\" stepKey=\"goToOrders\"/>\n+ <waitForPageLoad stepKey=\"waitForOrdersPageLoad\"/>\n+ <actionGroup ref=\"OpenOrderById\" stepKey=\"filterOrderGridById\">\n+ <argument name=\"orderId\" value=\"$grabOrderNumber\"/>\n+ </actionGroup>\n+ <grabFromCurrentUrl regex=\"~/order_id/(\\d+)/~\" stepKey=\"grabOrderId\"/>\n+\n+ <!-- Create Invoice 1 -->\n+ <click selector=\"{{AdminOrderDetailsMainActionsSection.invoice}}\" stepKey=\"clickInvoice1\"/>\n+ <waitForPageLoad stepKey=\"waitForInvoicePage1\"/>\n+ <fillField stepKey=\"fillQty\" userInput=\"1\" selector=\"{{AdminInvoiceItemsSection.itemQtyToInvoice('1')}}\"/>\n+ <fillField stepKey=\"fillNoQty\" userInput=\"0\" selector=\"{{AdminInvoiceItemsSection.itemQtyToInvoice('2')}}\"/>\n+ <click selector=\"{{AdminInvoiceItemsSection.updateQty}}\" stepKey=\"updateQty\"/>\n+ <waitForPageLoad stepKey=\"waitPageToBeLoaded\"/>\n+ <click selector=\"{{AdminInvoiceMainActionsSection.submitInvoice}}\" stepKey=\"submitInvoice1\"/>\n+ <waitForPageLoad stepKey=\"waitForLoadPage1\"/>\n+ <see userInput=\"The invoice has been created.\" stepKey=\"seeMessage1\"/>\n+\n+ <!-- Create Invoice 2 -->\n+ <click selector=\"{{AdminOrderDetailsMainActionsSection.invoice}}\" stepKey=\"clickInvoice2\"/>\n+ <waitForPageLoad stepKey=\"waitForInvoicePage2\"/>\n+ <click selector=\"{{AdminInvoiceMainActionsSection.submitInvoice}}\" stepKey=\"submitInvoice2\"/>\n+ <waitForPageLoad stepKey=\"waitForLoadPage2\"/>\n+ <see userInput=\"The invoice has been created.\" stepKey=\"seeMessage2\"/>\n+\n+ <!--Go to first created invoice-->\n+ <click selector=\"{{AdminOrderDetailsOrderViewSection.invoices}}\" stepKey=\"clickInvoicesTab\"/>\n+ <waitForPageLoad stepKey=\"waitForInvoicesPageLoad\"/>\n+ <seeElement selector=\"{{AdminOrderInvoicesTabSection.gridRow('1')}}\" stepKey=\"seeInvoiceInGrid\"/>\n+ <click selector=\"{{AdminOrderInvoicesTabSection.viewGridRow('1')}}\" stepKey=\"openInvoicePage\"/>\n+ <waitForPageLoad stepKey=\"waitForInvoicePageLoad\"/>\n+ <!--Submit refund and verify the refund was successful-->\n+ <click selector=\"{{AdminInvoiceMainActionsSection.openNewCreditMemoFromInvoice}}\" stepKey=\"clickCreateCreditMemo\"/>\n+ <waitForPageLoad stepKey=\"waitForCreditMemoPageLoad\"/>\n+ <!-- adding the raw selector here as the Magento provided one is incorrect -->\n+ <click selector=\".action-default.scalable.save.submit-button.refund.primary\" stepKey=\"submitRefund\"/>\n+ <see userInput=\"Amazon Pay refund successful.\" stepKey=\"seeAmazonMessage\"/>\n+ <see userInput=\"You created the credit memo.\" stepKey=\"seeMagentoMessage\"/>\n+\n+ <!--Go to second created invoice-->\n+ <click selector=\"{{AdminOrderDetailsOrderViewSection.invoices}}\" stepKey=\"clickInvoicesTab2\"/>\n+ <waitForPageLoad stepKey=\"waitForInvoicesPageLoad2\"/>\n+ <seeElement selector=\"{{AdminOrderInvoicesTabSection.gridRow('2')}}\" stepKey=\"seeInvoiceInGrid2\"/>\n+ <click selector=\"{{AdminOrderInvoicesTabSection.viewGridRow('2')}}\" stepKey=\"openInvoicePage2\"/>\n+ <waitForPageLoad stepKey=\"waitForInvoicePageLoad2\"/>\n+ <!--Submit refund and verify the refund was successful-->\n+ <click selector=\"{{AdminInvoiceMainActionsSection.openNewCreditMemoFromInvoice}}\" stepKey=\"clickCreateCreditMemo2\"/>\n+ <waitForPageLoad stepKey=\"waitForCreditMemoPageLoad2\"/>\n+ <!-- adding the raw selector here as the Magento provided one is incorrect -->\n+ <click selector=\".action-default.scalable.save.submit-button.refund.primary\" stepKey=\"submitRefund2\"/>\n+ <see userInput=\"Amazon Pay refund successful.\" stepKey=\"seeAmazonMessage2\"/>\n+ <see userInput=\"You created the credit memo.\" stepKey=\"seeMagentoMessage2\"/>\n+ </test>\n+</tests>\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
ASD-570 ported new tests to Magento 2.3
21,270
22.02.2021 13:34:25
28,800
3d71a2f203c824cdc7332c994c527a4f06cbd580
wip of cancel url
[ { "change_type": "MODIFY", "old_path": "Model/Adapter/AmazonPayAdapter.php", "new_path": "Model/Adapter/AmazonPayAdapter.php", "diff": "@@ -57,6 +57,8 @@ class AmazonPayAdapter\n*/\nprivate $url;\n+ private $redirect;\n+\n/**\n* AmazonPayAdapter constructor.\n* @param \\Amazon\\Pay\\Client\\ClientFactoryInterface $clientFactory\n@@ -74,7 +76,8 @@ class AmazonPayAdapter\n\\Magento\\Quote\\Api\\CartRepositoryInterface $quoteRepository,\n\\Amazon\\Pay\\Helper\\Data $amazonHelper,\n\\Amazon\\Pay\\Logger\\Logger $logger,\n- \\Magento\\Framework\\UrlInterface $url\n+ \\Magento\\Framework\\UrlInterface $url,\n+ \\Magento\\Framework\\App\\Response\\RedirectInterface $redirect\n) {\n$this->clientFactory = $clientFactory;\n$this->amazonConfig = $amazonConfig;\n@@ -83,6 +86,7 @@ class AmazonPayAdapter\n$this->amazonHelper = $amazonHelper;\n$this->logger = $logger;\n$this->url = $url;\n+ $this->redirect = $redirect;\n}\n/**\n@@ -437,6 +441,7 @@ class AmazonPayAdapter\n{\n$payload = [\n'signInReturnUrl' => $this->url->getRouteUrl('amazon_pay/login/authorize/'),\n+ 'signInCancelUrl' => \"-button-page-url-\",\n'storeId' => $this->amazonConfig->getClientId(),\n'signInScopes' => ['name', 'email'],\n];\n@@ -454,6 +459,7 @@ class AmazonPayAdapter\n$payload = [\n'webCheckoutDetails' => [\n'checkoutReviewReturnUrl' => $this->amazonConfig->getCheckoutReviewUrl(),\n+ 'checkoutCancelUrl' => $this->redirect->getRefererUrl(),\n],\n'storeId' => $this->amazonConfig->getClientId(),\n];\n" }, { "change_type": "MODIFY", "old_path": "view/frontend/web/js/action/checkout-session-config-load.js", "new_path": "view/frontend/web/js/action/checkout-session-config-load.js", "diff": "@@ -32,7 +32,7 @@ define([\n};\nreturn function (callback) {\nvar cartId = customerData.get('cart')()['data_id'] || window.checkout.storeId;\n- if (cartId !== getLocalStorage().get('cart_id')) {\n+ // if (cartId !== getLocalStorage().get('cart_id')) {\ncallbacks.push(callback);\nif (callbacks.length == 1) {\nremoteStorage.get(url.build('amazon_pay/checkout/config')).done(function (config) {\n@@ -43,8 +43,8 @@ define([\n} while (callbacks.length);\n});\n}\n- } else {\n- callback(getLocalStorage().get('config'));\n- }\n+ // } else {\n+ // callback(getLocalStorage().get('config'));\n+ // }\n};\n});\n" }, { "change_type": "MODIFY", "old_path": "view/frontend/web/js/amazon-button.js", "new_path": "view/frontend/web/js/amazon-button.js", "diff": "@@ -51,7 +51,7 @@ define([\nplacement: this.options.placement,\nbuttonColor: checkoutSessionConfig['button_color'],\ncreateCheckoutSessionConfig: {\n- payloadJSON: checkoutSessionConfig['checkout_payload'],\n+ payloadJSON: checkoutSessionConfig['checkout_payload'].replace('-button-page-url-', document.URL),\nsignature: checkoutSessionConfig['checkout_signature'],\npublicKeyId: checkoutSessionConfig['public_key_id'],\n}\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
ASD-600 wip of cancel url
21,270
23.02.2021 10:45:04
28,800
fe315bc453d241bebde2e9ae32a97885748e1b8e
wip of language field in admin
[ { "change_type": "MODIFY", "old_path": "Model/AmazonConfig.php", "new_path": "Model/AmazonConfig.php", "diff": "@@ -140,6 +140,10 @@ class AmazonConfig\n*/\npublic function getLanguage($scope = ScopeInterface::SCOPE_STORE, $scopeCode = null)\n{\n+ if ($lang = $this->scopeConfig->getValue('payment/amazon_payment/button_display_language')) {\n+ return $lang;\n+ }\n+\n$paymentRegion = $this->getRegion($scope, $scopeCode);\n$localeParts = explode('_', $this->localeResolver->getLocale());\n$lang = $localeParts[0];\n" }, { "change_type": "MODIFY", "old_path": "view/adminhtml/layout/adminhtml_system_config_edit.xml", "new_path": "view/adminhtml/layout/adminhtml_system_config_edit.xml", "diff": "<head>\n<css src=\"Amazon_Pay::styles.css\"/>\n<script src=\"Amazon_Pay::js/credentials.js\" />\n+ <script src=\"Amazon_Pay::js/custom.js\" />\n</head>\n</page>\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
ASD-577 wip of language field in admin
21,270
23.02.2021 11:53:04
28,800
10b196e256f6e872cef681409fb339b82049fa4c
updates Alexa feature name
[ { "change_type": "MODIFY", "old_path": "README.md", "new_path": "README.md", "diff": "@@ -12,7 +12,7 @@ Starting from version 5.0.0, Amazon Pay is hosted on the Magento Marketplace and\n* Avoids problems on browsers that have active cookie blocking or tracking protection mechanisms\n* Supports digital goods as well as physical goods\n* Automatic, graceful handling of declined authorization, increasing checkout conversion rate\n-* Built-in Alexa Notifications feature support\n+* Built-in Alexa Delivery Notifications feature support\n* Ability to hide Amazon Pay as a checkout option for specific product categories\n## Full feature list\n@@ -28,7 +28,7 @@ Starting from version 5.0.0, Amazon Pay is hosted on the Magento Marketplace and\n* Custom Front-Ends / Headless Commerce support\n* Physical and Digital Goods support\n* Ability to hide Amazon Pay as a checkout option for specific product categories\n-* Built-in Alexa Notifications feature support\n+* Built-in Alexa Delivery Notifications feature support\n* [EU/UK only] Multi-currency support\n* [EU/UK only] Support for Strong Customer Authorization (PSD2 compliant)\n* [EU/UK only] Billing Address available at checkout\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
ASD-643 updates Alexa feature name
21,270
23.02.2021 15:30:56
28,800
a45b9f841271b73f58922879f453b389bbf5e4c3
rounds-up the usage of the cancel url feature
[ { "change_type": "MODIFY", "old_path": "CHANGELOG.md", "new_path": "CHANGELOG.md", "diff": "# Change Log\n+## <new release>\n+* Uses the button page URL as the redirect back when cancelling the session. Provides tests for it.\n+\n## 5.0.1\n* Remove reliance on legacy config value being set.\n" }, { "change_type": "MODIFY", "old_path": "Model/Adapter/AmazonPayAdapter.php", "new_path": "Model/Adapter/AmazonPayAdapter.php", "diff": "@@ -57,6 +57,9 @@ class AmazonPayAdapter\n*/\nprivate $url;\n+ /**\n+ * @var \\Magento\\Framework\\App\\Response\\RedirectInterface\n+ */\nprivate $redirect;\n/**\n@@ -67,7 +70,8 @@ class AmazonPayAdapter\n* @param \\Magento\\Quote\\Api\\CartRepositoryInterface $quoteRepository\n* @param \\Amazon\\Pay\\Helper\\Data $amazonHelper\n* @param \\Amazon\\Pay\\Logger\\Logger $logger\n- * @pqram \\Magento\\Framework\\UrlInterface $url\n+ * @param \\Magento\\Framework\\UrlInterface $url\n+ * @param \\Magento\\Framework\\App\\Response\\RedirectInterface $redirect\n*/\npublic function __construct(\n\\Amazon\\Pay\\Client\\ClientFactoryInterface $clientFactory,\n@@ -441,7 +445,7 @@ class AmazonPayAdapter\n{\n$payload = [\n'signInReturnUrl' => $this->url->getRouteUrl('amazon_pay/login/authorize/'),\n- 'signInCancelUrl' => \"-button-page-url-\",\n+ 'signInCancelUrl' => $this->redirect->getRefererUrl(),\n'storeId' => $this->amazonConfig->getClientId(),\n'signInScopes' => ['name', 'email'],\n];\n" }, { "change_type": "MODIFY", "old_path": "view/frontend/web/js/action/checkout-session-config-load.js", "new_path": "view/frontend/web/js/action/checkout-session-config-load.js", "diff": "@@ -32,7 +32,8 @@ define([\n};\nreturn function (callback) {\nvar cartId = customerData.get('cart')()['data_id'] || window.checkout.storeId;\n- // if (cartId !== getLocalStorage().get('cart_id')) {\n+ var config = getLocalStorage().get('config') || false;\n+ if (config && !config.checkout_payload.includes(document.URL)) {\ncallbacks.push(callback);\nif (callbacks.length == 1) {\nremoteStorage.get(url.build('amazon_pay/checkout/config')).done(function (config) {\n@@ -43,8 +44,8 @@ define([\n} while (callbacks.length);\n});\n}\n- // } else {\n- // callback(getLocalStorage().get('config'));\n- // }\n+ } else {\n+ callback(getLocalStorage().get('config'));\n+ }\n};\n});\n" }, { "change_type": "MODIFY", "old_path": "view/frontend/web/js/amazon-button.js", "new_path": "view/frontend/web/js/amazon-button.js", "diff": "@@ -51,7 +51,7 @@ define([\nplacement: this.options.placement,\nbuttonColor: checkoutSessionConfig['button_color'],\ncreateCheckoutSessionConfig: {\n- payloadJSON: checkoutSessionConfig['checkout_payload'].replace('-button-page-url-', document.URL),\n+ payloadJSON: checkoutSessionConfig['checkout_payload'],\nsignature: checkoutSessionConfig['checkout_signature'],\npublicKeyId: checkoutSessionConfig['public_key_id'],\n}\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
ASD-600 rounds-up the usage of the cancel url feature
21,270
24.02.2021 10:08:25
28,800
0eee27aaf884d2b32cd34407e597d716ca8d3104
fix issue when no session is present yet
[ { "change_type": "MODIFY", "old_path": "view/frontend/web/js/action/checkout-session-config-load.js", "new_path": "view/frontend/web/js/action/checkout-session-config-load.js", "diff": "@@ -33,7 +33,7 @@ define([\nreturn function (callback) {\nvar cartId = customerData.get('cart')()['data_id'] || window.checkout.storeId;\nvar config = getLocalStorage().get('config') || false;\n- if (config && !config.checkout_payload.includes(document.URL)) {\n+ if (typeof config.checkout_payload === 'undefined' || !config.checkout_payload.includes(document.URL)) {\ncallbacks.push(callback);\nif (callbacks.length == 1) {\nremoteStorage.get(url.build('amazon_pay/checkout/config')).done(function (config) {\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
ASD-600 fix issue when no session is present yet
21,270
24.02.2021 13:28:13
28,800
d18e149d9b1bcfc8659f1e9c9aab76e11798ae45
fixes updating config without new private key
[ { "change_type": "MODIFY", "old_path": "Plugin/ConfigCredentialsValidator.php", "new_path": "Plugin/ConfigCredentialsValidator.php", "diff": "@@ -210,6 +210,7 @@ class ConfigCredentialsValidator\n{\ntry {\nif ($this->isApplicable($subject)) {\n+ $subject->load();\n$config = $this->getUpdatedConfig($subject);\nif (!empty($config) || $this->isUpdatedActive($subject) || $this->isUpdatedStoreId($subject)) {\n$this->validateConfig($subject, $config);\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
ASD-577 fixes updating config without new private key
21,270
24.02.2021 13:29:46
28,800
d2c4a0a62c747a42c98e6abb58e7dc26bec334a9
finishes the language config field
[ { "change_type": "MODIFY", "old_path": "Model/AmazonConfig.php", "new_path": "Model/AmazonConfig.php", "diff": "@@ -27,6 +27,17 @@ class AmazonConfig\nconst LANG_JA = 'ja_JP';\nconst LANG_UK = 'en_GB';\nconst LANG_US = 'en_US';\n+ const EUROPEAN_LOCALES = [\n+ self::LANG_UK,\n+ self::LANG_DE,\n+ self::LANG_FR,\n+ self::LANG_IT,\n+ self::LANG_ES,\n+ ];\n+ const EUROPEAN_REGIONS = [\n+ 'de',\n+ 'uk',\n+ ];\n/**\n* @var \\Magento\\Framework\\App\\Config\\ScopeConfigInterface\n@@ -140,11 +151,22 @@ class AmazonConfig\n*/\npublic function getLanguage($scope = ScopeInterface::SCOPE_STORE, $scopeCode = null)\n{\n- if ($lang = $this->scopeConfig->getValue('payment/amazon_payment/button_display_language')) {\n+ $paymentRegion = $this->getRegion($scope, $scopeCode);\n+\n+ // check if button language is set and it matches allowed region and options\n+ $lang = $this->scopeConfig->getValue(\n+ 'payment/amazon_pay/button_display_language',\n+ $scope,\n+ $scopeCode\n+ );\n+\n+ if ($lang) {\n+ if (in_array($lang, self::EUROPEAN_LOCALES)\n+ && in_array($paymentRegion, self::EUROPEAN_REGIONS)) {\nreturn $lang;\n}\n+ }\n- $paymentRegion = $this->getRegion($scope, $scopeCode);\n$localeParts = explode('_', $this->localeResolver->getLocale());\n$lang = $localeParts[0];\nswitch ($lang) {\n" }, { "change_type": "MODIFY", "old_path": "view/adminhtml/web/js/custom.js", "new_path": "view/adminhtml/web/js/custom.js", "diff": "@@ -22,7 +22,6 @@ require(['jquery', 'domReady!'], function ($) {\nlanguageId = $('[data-ui-id=text-groups-amazon-pay-groups-advanced-groups-frontend-fields-display-language-value]'),\nvalue = $(this).val();\nif (regions.includes(value)) {\n- languageId.val('');\nlanguageRow.show();\n}\nelse {\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
ASD-577 finishes the language config field
21,270
25.02.2021 12:33:47
28,800
8947580950c6545daad3c7c16ae033fe04112f7c
replaces private key field with a .pem file parser
[ { "change_type": "MODIFY", "old_path": "CHANGELOG.md", "new_path": "CHANGELOG.md", "diff": "# Change Log\n+## <new release>\n+* Replaces private key field with a .pem file parser.\n+\n## 5.0.1\n* Remove reliance on legacy config value being set.\n" }, { "change_type": "RENAME", "old_path": "Model/Config/Form/Privatekey.php", "new_path": "Model/Config/File/PemFile.php", "diff": "* express or implied. See the License for the specific language governing\n* permissions and limitations under the License.\n*/\n-namespace Amazon\\Pay\\Model\\Config\\Form;\n+namespace Amazon\\Pay\\Model\\Config\\File;\n/**\n- * Frontend model to obscure decrypted textarea\n- *\n- * Class Privatekey\n+ * Class PemFile\n+ * @package Amazon\\Pay\\Model\\Config\\File\n*/\n-class Privatekey extends \\Magento\\Config\\Block\\System\\Config\\Form\\Field\n+class PemFile extends \\Magento\\Config\\Block\\System\\Config\\Form\\Field\\File\n{\n- const OBSCURED = '******';\n-\n/**\n- * Retrieve element HTML markup and add OBSCURED textarea value\n- *\n- * @param \\Magento\\Framework\\Data\\Form\\Element\\AbstractElement $element\n* @return string\n*/\n- protected function _getElementHtml(\\Magento\\Framework\\Data\\Form\\Element\\AbstractElement $element)\n+ protected function _getDeleteCheckbox()\n{\n- if ($element->getValue()) {\n- $element->setValue(self::OBSCURED);\n+ if ($this->getValue()) {\n+ return '<div>.pem key already saved</div>';\n}\n- return $element->getElementHtml();\n+\n+ return '';\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "Plugin/ConfigCredentialsValidator.php", "new_path": "Plugin/ConfigCredentialsValidator.php", "diff": "@@ -115,7 +115,19 @@ class ConfigCredentialsValidator\n$scope = $subject->getScope() ?: ScopeInterface::SCOPE_STORE;\n$scopeCode = $subject->getScopeCode();\n- $privateKey = $subject->getData(self::XML_PATH_PRIVATE_KEY);\n+ $privateKeyArray = $subject->getData(self::XML_PATH_PRIVATE_KEY);\n+ if (empty($privateKeyArray['name'])) {\n+ $privateKey = '*';\n+ }\n+ else {\n+ $privateKey = file_get_contents($privateKeyArray['tmp_name']);\n+ if (!preg_match(\n+ '/^-----BEGIN (RSA )?PRIVATE KEY-----.*-----END (RSA )?PRIVATE KEY-----$/s',\n+ $privateKey)\n+ ) {\n+ throw new \\Magento\\Framework\\Exception\\LocalizedException(__('Invalid key'));\n+ }\n+ }\nif ($privateKey && (\npreg_match('/^\\*+$/', $privateKey) ||\n$privateKey === $this->amazonConfig->getPrivateKey($scope, $scopeCode))\n" }, { "change_type": "MODIFY", "old_path": "etc/adminhtml/system.xml", "new_path": "etc/adminhtml/system.xml", "diff": "<source_model>Magento\\Config\\Model\\Config\\Source\\Yesno</source_model>\n<config_path>payment/amazon_payment_v2/active</config_path>\n</field>\n- <field id=\"private_key\" translate=\"label comment\" type=\"textarea\" sortOrder=\"5\" showInDefault=\"1\" showInWebsite=\"1\" showInStore=\"1\">\n- <label>Private Key</label>\n+ <field id=\"private_key\" translate=\"label comment\" type=\"Amazon\\Pay\\Model\\Config\\File\\PemFile\" sortOrder=\"5\" showInDefault=\"1\" showInWebsite=\"1\" showInStore=\"1\">\n+ <label>Private Key (.pem)</label>\n<config_path>payment/amazon_payment_v2/private_key</config_path>\n- <frontend_model>Amazon\\Pay\\Model\\Config\\Form\\Privatekey</frontend_model>\n- <backend_model>Magento\\Config\\Model\\Config\\Backend\\Encrypted</backend_model>\n- <validate>validate-private-key</validate>\n+ <backend_model>Amazon\\Pay\\Model\\Config\\File\\PrivateKeyPem</backend_model>\n+ <upload_dir config=\"system\" scope_info=\"1\">amazon</upload_dir>\n<depends><field id=\"active_v2\">1</field></depends>\n</field>\n<field id=\"public_key_id\" translate=\"label comment\" type=\"text\" sortOrder=\"6\" showInDefault=\"1\" showInWebsite=\"1\" showInStore=\"1\">\n" }, { "change_type": "MODIFY", "old_path": "view/adminhtml/web/js/validation-mixin.js", "new_path": "view/adminhtml/web/js/validation-mixin.js", "diff": "@@ -29,17 +29,6 @@ define(['jquery'], function ($) {\n},\n$.mage.__('Please enter a valid URL. Secure protocol is required (https://).')\n),\n- $.validator.addMethod(\n- 'validate-private-key',\n- function (v) {\n- if (v == '******') {\n- return true;\n- }\n- return (/^-----BEGIN (RSA )?PRIVATE KEY-----.*-----END (RSA )?PRIVATE KEY-----$/s).test(v);\n- },\n- $.mage.__('Private Key field is invalid. It must include header ' +\n- 'and footer of the private key. Please check and try again')\n- ),\n$.validator.addMethod(\n'validate-amzn-merchant-id',\nfunction (v) {\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
ASD-647 replaces private key field with a .pem file parser
21,270
25.02.2021 12:48:23
28,800
dca58fae6ed299b588c195992d4fedcffbe8733a
adds missing class reference
[ { "change_type": "MODIFY", "old_path": "Model/Config/File/PrivateKeyPem.php", "new_path": "Model/Config/File/PrivateKeyPem.php", "diff": "@@ -47,7 +47,7 @@ class PrivateKeyPem extends \\Magento\\Config\\Model\\Config\\Backend\\File\n\\Magento\\Framework\\App\\Cache\\TypeListInterface $cacheTypeList,\n\\Magento\\MediaStorage\\Model\\File\\UploaderFactory $uploaderFactory,\n\\Magento\\Config\\Model\\Config\\Backend\\File\\RequestData\\RequestDataInterface $requestData,\n- Filesystem $filesystem,\n+ \\Magento\\Framework\\Filesystem $filesystem,\n\\Magento\\Framework\\Encryption\\EncryptorInterface $encryptor,\n\\Magento\\Framework\\Model\\ResourceModel\\AbstractResource $resource = null,\n\\Magento\\Framework\\Data\\Collection\\AbstractDb $resourceCollection = null,\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
ASD-647 adds missing class reference
21,270
25.02.2021 16:01:36
28,800
7f61ca154a8e8178fdcae6887bba1e32c479055b
adds test for cancel urls
[ { "change_type": "MODIFY", "old_path": "Test/Mftf-24/Section/AmazonPageSection.xml", "new_path": "Test/Mftf-24/Section/AmazonPageSection.xml", "diff": "<element name=\"signInButton\" type=\"button\" selector=\"#signInSubmit\"/>\n<element name=\"checkoutButton\" type=\"button\" selector=\"#default-button-content input[type=submit]\"/>\n<element name=\"cancelButton\" type=\"button\" selector=\"#return_back_to_merchant_link\"/>\n+ <element name=\"loginCancelButton\" type=\"button\" selector=\"#consent-wrapper-content [data-action='cancel-consent'] a\"/>\n<element name=\"addressId\" type=\"text\" selector=\"#default .default_address .address_id\"/>\n<element name=\"addressDetails\" type=\"text\" selector=\"#change-buyer-details li[data-address_id='{{address_id}}']\" parameterized=\"true\"/>\n<element name=\"changeAddressButton\" type=\"button\" selector=\"#change-address-button\"/>\n" }, { "change_type": "ADD", "old_path": null, "new_path": "Test/Mftf-24/Test/AmazonCancelReturnUrl.xml", "diff": "+<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n+<tests xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"urn:magento:mftf:Test/etc/testSchema.xsd\">\n+ <test name=\"AmazonCancelReturnUrl\">\n+ <annotations>\n+ <stories value=\"Amazon Cancel Return Url\"/>\n+ <title value=\"Amazon Cancel Return Url\"/>\n+ <description value=\"User should be directed to the page where they clicked the Amazon Pay button when clicking Cancel\"/>\n+ <severity value=\"CRITICAL\"/>\n+ <group value=\"amazon_pay\"/>\n+ <group value=\"amazon_pay_button\"/>\n+ </annotations>\n+\n+ <before>\n+ <createData entity=\"SimpleTwo\" stepKey=\"createSimpleProduct\"/>\n+ <createData entity=\"SampleAmazonPaymentConfigLwa\" stepKey=\"SampleAmazonPaymentConfigLwa\"/>\n+ <magentoCLI command=\"config:set {{AmazonButtonProductConfig.path}} 1\" stepKey=\"displayAmazonButtonProduct\"/>\n+ <magentoCLI command=\"cache:flush\" stepKey=\"flushCache\"/>\n+ </before>\n+\n+ <after>\n+ <createData entity=\"SampleAmazonPaymentConfig\" stepKey=\"SampleAmazonPaymentConfigData\"/>\n+ <magentoCLI command=\"cache:flush\" stepKey=\"flushCache\"/>\n+ </after>\n+\n+ <!-- Click Sign-in button from sign-in page -->\n+ <amOnPage url=\"{{StorefrontCustomerSignInPage.url}}\" stepKey=\"amOnSignInPage\"/>\n+ <waitForPageLoad time=\"30\" stepKey=\"waitPageFullyLoaded\"/>\n+ <click selector=\"{{AmazonLoginSection.login}}\" stepKey=\"signInWithAmazon\"/>\n+\n+ <!-- Login to Amazon -->\n+ <actionGroup ref=\"AmazonLoginOnlyActionGroup\" stepKey=\"amazonLoginOnlyActionGroup\"/>\n+ <waitForElement selector=\"{{AmazonPageSection.loginCancelButton}}\" stepKey=\"waitForCancelLogin\"/>\n+\n+ <!-- Cancel login with Amazon and land back on sign-in Magento page -->\n+ <click selector=\"{{AmazonPageSection.loginCancelButton}}\" stepKey=\"clickLoginCancelButton\"/>\n+ <waitForPageLoad stepKey=\"waitForSigninPageLoad\"/>\n+ <seeInCurrentUrl url=\"{{StorefrontCustomerSignInPage.url}}\" stepKey=\"assertLoginUrl\"/>\n+\n+ <!--Go to product page-->\n+ <actionGroup ref=\"StorefrontOpenProductPageActionGroup\" stepKey=\"openProductStoreFront\">\n+ <argument name=\"productUrl\" value=\"$$createSimpleProduct.custom_attributes[url_key]$$\"/>\n+ </actionGroup>\n+ <!--Verify only Amazon Button is present-->\n+ <seeElement selector=\"{{AmazonButtonSection.product}}\" stepKey=\"seeEnabledAmazonButton\"/>\n+\n+ <!-- Click Amazon Pay button on product page and login -->\n+ <click selector=\"{{AmazonButtonSection.product}}\" stepKey=\"clickAmazonButton\"/>\n+ <waitForElement selector=\"{{AmazonPageSection.checkoutButton}}\" stepKey=\"seeAmazonCheckoutButton\"/>\n+ <!-- <actionGroup ref=\"AmazonLoginActionGroup\" stepKey=\"amazonLoginActionGroup\"/> -->\n+\n+ <!--Come back to checkout with default address-->\n+ <actionGroup ref=\"AmazonCheckoutActionGroup\" stepKey=\"DefaultAmazonCheckoutActionGroup\"/>\n+\n+ <!-- Click edit button on address -->\n+ <click selector=\"{{AmazonCheckoutSection.editShippingButton}}\" stepKey=\"clickAmazonEditShippingButton\"/>\n+ <waitForElement selector=\"{{AmazonPageSection.cancelButton}}\" stepKey=\"waitForCancelCheckout\"/>\n+\n+ <!-- Click cancel button on Amazon hosted page -->\n+ <click selector=\"{{AmazonPageSection.cancelButton}}\" stepKey=\"cancelCheckout\"/>\n+ <waitForPageLoad stepKey=\"waitForProductPageLoad\"/>\n+\n+ <!-- Assert being back in the product page -->\n+ <seeInCurrentUrl url=\"$$createSimpleProduct.custom_attributes[url_key]$$\" stepKey=\"assertProductUrl\"/>\n+ </test>\n+</tests>\n\\ No newline at end of file\n" } ]
PHP
Apache License 2.0
amzn/amazon-payments-magento-2-plugin
ASD-600 adds test for cancel urls