Last active
September 1, 2022 10:18
-
-
Save scgoeswild/a075891da916f7aa07b84c9a6546092a to your computer and use it in GitHub Desktop.
Magento2 Stripe patch for Amazon Pay wallet payment
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#This Magento patch fix the Stripe module which override the Amazon Pay Wallet even if is selected as gateway. | |
--- vendor/stripe/module-payments/view/frontend/web/js/view/payment/apple_pay.js 2022-08-31 10:42:45.101389300 -0400 | |
+++ vendor/stripe/module-payments/view/frontend/web/js/view/payment/apple_pay.js 2022-08-31 10:41:38.809286854 -0400 | |
@@ -10,6 +10,7 @@ | |
'Magento_Checkout/js/action/select-payment-method', | |
'Magento_Checkout/js/checkout-data', | |
'Magento_Checkout/js/model/quote', | |
+ 'Amazon_Pay/js/model/storage', | |
'mage/translate', | |
'Magento_Ui/js/model/messageList' | |
], | |
@@ -24,6 +25,7 @@ | |
selectPaymentMethod, | |
checkoutData, | |
quote, | |
+ amazonStorage, | |
$t, | |
globalMessageList | |
) { | |
@@ -48,7 +50,7 @@ | |
stripeExpress.onPaymentSupportedCallbacks.push(function() | |
{ | |
- self.isPaymentRequestAPISupported(true); | |
+ self.isPaymentRequestAPISupported(!amazonStorage.isAmazonCheckout()); | |
self.stripePaymentsShowApplePaySection(true); | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment