From 2e67615a363c385603a8af9557fb05733f395bb3 Mon Sep 17 00:00:00 2001 From: leon-zhang-awx Date: Fri, 18 Oct 2024 16:39:23 +0800 Subject: [PATCH] fix reCaptcha is not work in cart page --- view/frontend/web/js/view/payment/utils.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/view/frontend/web/js/view/payment/utils.js b/view/frontend/web/js/view/payment/utils.js index b364f2e7..1e8e6b47 100644 --- a/view/frontend/web/js/view/payment/utils.js +++ b/view/frontend/web/js/view/payment/utils.js @@ -246,6 +246,7 @@ define([ }, isRecaptchaShared() { + if (this.isCartPage()) return false; if (!window.checkoutConfig) return false; return window.checkoutConfig.payment.airwallex_payments.is_recaptcha_shared; }, @@ -634,7 +635,7 @@ define([ if (self.isSaveCardSelected() && self.getCustomerId()) { let requestUrl = urlBuilder.build('rest/V1/airwallex/generate_client_secret'); let res = await storage.get(requestUrl, undefined, 'application/json', {}); - + await Airwallex.createPaymentConsent({ intent_id: intentResponse.intent_id, customer_id: self.getCustomerId(),