Skip to content

Commit

Permalink
Merge pull request #1216 from BearGroup/release/5.16.1
Browse files Browse the repository at this point in the history
Release/5.16.1
  • Loading branch information
NisiPasa committed Oct 10, 2023
2 parents e5d32fe + 412d874 commit 2b1fa0b
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Block/Adminhtml/System/Config/AutoKeyExchangeAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public function getCurrency()
*/
public function canUpgrade()
{
return $this->keyUpgrade->getMwsKeyForScope();
return $this->keyUpgrade->getMwsKeyForScope() && !$this->keyUpgrade->getExistingPublicKeyId();
}

/**
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Change Log

## 5.16.1
* Remove platform/module version information from button payloads
* Fixed admin display bug regarding upgrading legacy keys when a CV2 public key ID already exists
* Fixed invoice comment noise with Automatic Authorization Mode

## 5.16.0
* Added support for subscriptions, requires the ParadoxLabs Adaptive Subscription module
* Added platformid for APB payload
Expand Down
9 changes: 4 additions & 5 deletions Model/Adapter/AmazonPayAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,7 @@ public function updateCheckoutSession($quote, $checkoutSessionId, $paymentIntent
'chargeAmount' => $this->createPrice($quote->getGrandTotal(), $quote->getQuoteCurrencyCode()),
],
'merchantMetadata' => [
'merchantStoreName' => $this->amazonConfig->getStoreName(),
'customInformation' => $this->getMerchantCustomInformation(),
'merchantStoreName' => $this->amazonConfig->getStoreName()
],
'platformId' => $this->amazonConfig->getPlatformId(),
];
Expand Down Expand Up @@ -335,7 +334,8 @@ public function updateChargePermission(int $storeId, string $chargePermissionId,
{
$payload = [
'merchantMetadata' => [
'merchantReferenceId' => $data['merchantReferenceId']
'merchantReferenceId' => $data['merchantReferenceId'],
'customInformation' => $this->getMerchantCustomInformation()
]
];

Expand Down Expand Up @@ -623,8 +623,7 @@ public function generatePayNowButtonPayload(Quote $quote, $paymentIntent = Payme
'presentmentCurrency' => $currencyCode,
],
'merchantMetadata' => [
'merchantStoreName' => $this->amazonConfig->getStoreName(),
'customInformation' => $this->getMerchantCustomInformation()
'merchantStoreName' => $this->amazonConfig->getStoreName()
],
'platformId' => $this->amazonConfig->getPlatformId(),
];
Expand Down
4 changes: 3 additions & 1 deletion Model/CheckoutSessionManagement.php
Original file line number Diff line number Diff line change
Expand Up @@ -825,7 +825,9 @@ public function completeCheckoutSession($amazonSessionId, $cartId = null)
$quote->getQuoteCurrencyCode()
);
// capture and invoice on the Magento side
$this->asyncCharge->capture($order, $chargeId, $quote->getGrandTotal());
if ($this->amazonConfig->getAuthorizationMode() == AuthorizationMode::SYNC) {
$this->asyncCharge->capture($order, $chargeId, $quote->getGrandTotal());
}
}
$amazonCharge = $this->amazonAdapter->getCharge($quote->getStoreId(), $chargeId);

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ The following table provides an overview on which Git branch is compatible to wh
Magento Version | Github Branch | Latest release
---|---|---
2.2.6 - 2.2.11 (EOL) | [V2checkout-1.2.x](https://github.com/amzn/amazon-payments-magento-2-plugin/tree/V2checkout-1.2.x) | 1.20.0 (EOL)
2.3.0 - 2.4.x | [master](https://github.com/amzn/amazon-payments-magento-2-plugin/tree/master) | 5.16.0
2.3.0 - 2.4.x | [master](https://github.com/amzn/amazon-payments-magento-2-plugin/tree/master) | 5.16.1

## Release Notes
See [CHANGELOG.md](/CHANGELOG.md)
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "amzn/amazon-pay-magento-2-module",
"description": "Official Magento2 Plugin to integrate with Amazon Pay",
"type": "magento2-module",
"version": "5.16.0",
"version": "5.16.1",
"license": [
"Apache-2.0"
],
Expand Down

0 comments on commit 2b1fa0b

Please sign in to comment.