From b9d89c3dbada36f4bcc706f63a3a331cf26cf7cf Mon Sep 17 00:00:00 2001 From: Can Demiralp Date: Thu, 11 Jan 2024 14:50:34 +0100 Subject: [PATCH 1/2] [ECP-8770-v1] Fix shipping method parsing error (#71) * [ECP-8770-v1] Remove the shipping_method from shipping methods response if it's not available * [ECP-8770-v1] Add comments --- view/frontend/web/js/googlepay/button.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/view/frontend/web/js/googlepay/button.js b/view/frontend/web/js/googlepay/button.js index cc19c9c..49138e0 100644 --- a/view/frontend/web/js/googlepay/button.js +++ b/view/frontend/web/js/googlepay/button.js @@ -280,7 +280,15 @@ define([ activateCart(this.isProductView) .then(() => getShippingMethods(payload, this.isProductView)) .then(function (response) { - // Stop if no shipping methods. + + // If the shipping_method is not available, remove it from the response array. + for (let key in response) { + if (response[key].available === false) { + response.splice(key, 1); + } + } + + // Stop if no shipping methods. if (response.length === 0) { reject($t('There are no shipping methods available for you right now. Please try again or use an alternative payment method.')); return; From 3dcb7449b560e28a6084ec3a1cea2d831f725c05 Mon Sep 17 00:00:00 2001 From: khushboos Date: Thu, 25 Jan 2024 13:55:33 +0100 Subject: [PATCH 2/2] Version Upgrade to 1.2.1 --- composer.json | 2 +- etc/module.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index f91b33a..96d7010 100755 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "adyen/adyen-magento2-expresscheckout", "description": "Official Adyen Magento2 plugin to add express payment method shortcuts.", "type": "magento2-module", - "version": "1.2.0", + "version": "1.2.1", "license": "MIT", "repositories": [ { diff --git a/etc/module.xml b/etc/module.xml index 77d3477..437f44b 100755 --- a/etc/module.xml +++ b/etc/module.xml @@ -11,7 +11,7 @@ */ --> - +