From 026889b43e66ff5807f91f9c6d356802f5e9ad0b Mon Sep 17 00:00:00 2001 From: Kirill Braslavsky Date: Thu, 18 Feb 2021 12:16:44 +0200 Subject: [PATCH 1/5] remove spinner on click, on cancel and on error --- .../js/modules/ActionHandler/CheckoutActionHandler.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/ppcp-button/resources/js/modules/ActionHandler/CheckoutActionHandler.js b/modules/ppcp-button/resources/js/modules/ActionHandler/CheckoutActionHandler.js index 4af23327a..5b066b468 100644 --- a/modules/ppcp-button/resources/js/modules/ActionHandler/CheckoutActionHandler.js +++ b/modules/ppcp-button/resources/js/modules/ActionHandler/CheckoutActionHandler.js @@ -53,8 +53,15 @@ class CheckoutActionHandler { return { createOrder, onApprove:onApprove(this, this.errorHandler, this.spinner), + onClick: () => { + spinner.unblock(); + }, + onCancel: () => { + spinner.unblock(); + }, onError: (error) => { this.errorHandler.genericError(); + spinner.unblock(); } } } From ca7ca20a5484a43ddb08ef58d4907e37b045b107 Mon Sep 17 00:00:00 2001 From: Kirill Braslavsky Date: Thu, 25 Feb 2021 13:30:23 +0200 Subject: [PATCH 2/5] Don't block UI on order creating start --- .../js/modules/ActionHandler/CheckoutActionHandler.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/modules/ppcp-button/resources/js/modules/ActionHandler/CheckoutActionHandler.js b/modules/ppcp-button/resources/js/modules/ActionHandler/CheckoutActionHandler.js index 5b066b468..98e2da238 100644 --- a/modules/ppcp-button/resources/js/modules/ActionHandler/CheckoutActionHandler.js +++ b/modules/ppcp-button/resources/js/modules/ActionHandler/CheckoutActionHandler.js @@ -19,9 +19,6 @@ class CheckoutActionHandler { const errorHandler = this.errorHandler; const formSelector = this.config.context === 'checkout' ? 'form.checkout' : 'form#order_review'; - spinner.setTarget(formSelector); - spinner.block(); - const formValues = jQuery(formSelector).serialize(); return fetch(this.config.ajax.create_order.endpoint, { @@ -53,13 +50,10 @@ class CheckoutActionHandler { return { createOrder, onApprove:onApprove(this, this.errorHandler, this.spinner), - onClick: () => { - spinner.unblock(); - }, onCancel: () => { spinner.unblock(); }, - onError: (error) => { + onError: () => { this.errorHandler.genericError(); spinner.unblock(); } From 33146ca3547a3e58ca742627610f7a9350f55987 Mon Sep 17 00:00:00 2001 From: Kirill Braslavsky Date: Thu, 25 Feb 2021 13:39:44 +0200 Subject: [PATCH 3/5] unblock UI when error on hosted fields caught --- .../resources/js/modules/Renderer/CreditCardRenderer.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/ppcp-button/resources/js/modules/Renderer/CreditCardRenderer.js b/modules/ppcp-button/resources/js/modules/Renderer/CreditCardRenderer.js index 48327ddba..6e4b2ca88 100644 --- a/modules/ppcp-button/resources/js/modules/Renderer/CreditCardRenderer.js +++ b/modules/ppcp-button/resources/js/modules/Renderer/CreditCardRenderer.js @@ -115,6 +115,9 @@ class CreditCardRenderer { payload.orderID = payload.orderId; this.spinner.unblock(); return contextConfig.onApprove(payload); + }).catch(() => { + this.spinner.unblock(); + this.errorHandler.genericError() }); } else { this.spinner.unblock(); @@ -147,4 +150,4 @@ class CreditCardRenderer { ) } } -export default CreditCardRenderer; \ No newline at end of file +export default CreditCardRenderer; From 4cbbb34c7df00029f106ff940ed58952ee5e7af6 Mon Sep 17 00:00:00 2001 From: dinamiko Date: Thu, 4 Mar 2021 16:46:33 +0100 Subject: [PATCH 4/5] Bump 1.2.0 version --- changelog.txt | 4 ++++ package.json | 2 +- readme.txt | 6 +++++- woocommerce-paypal-payments.php | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/changelog.txt b/changelog.txt index 2ae207139..e95138ec5 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,9 @@ *** Changelog *** += 1.2.0 - 2021-03-08 = +* Add - Rework onboarding code and add REST controller for integration with the OBW. #121 +* Fix - Remove spinner on click, on cancel and on error. #124 + = 1.1.0 - 2021-02-01 = * Add - Buy Now Pay Later for UK. #104 * Add - DE now has 12 month installments. #106 diff --git a/package.json b/package.json index 85d9f419d..3c046440f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "woocommerce-paypal-payments", - "version": "1.1.0", + "version": "1.2.0", "description": "WooCommerce PayPal Payments", "repository": "https://github.com/woocommerce/woocommerce-paypal-payments", "license": "GPL-2.0", diff --git a/readme.txt b/readme.txt index 3bafd47a0..a11b59000 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Tags: woocommerce, paypal, payments, ecommerce, e-commerce, store, sales, sell, Requires at least: 5.3 Tested up to: 5.6 Requires PHP: 7.0 -Stable tag: 1.1.0 +Stable tag: 1.2.0 License: GPLv2 License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -58,6 +58,10 @@ Follow the steps below to connect the plugin to your PayPal account: == Changelog == += 1.2.0 = +* Add - Rework onboarding code and add REST controller for integration with the OBW. #121 +* Fix - Remove spinner on click, on cancel and on error. #124 + = 1.1.0 = * Add - Buy Now Pay Later for UK. #104 * Add - DE now has 12 month installments. #106 diff --git a/woocommerce-paypal-payments.php b/woocommerce-paypal-payments.php index a25c077b7..37d605101 100644 --- a/woocommerce-paypal-payments.php +++ b/woocommerce-paypal-payments.php @@ -3,7 +3,7 @@ * Plugin Name: WooCommerce PayPal Payments * Plugin URI: https://woocommerce.com/products/woocommerce-paypal-payments/ * Description: PayPal's latest complete payments processing solution. Accept PayPal, PayPal Credit, credit/debit cards, alternative digital wallets local payment types and bank accounts. Turn on only PayPal options or process a full suite of payment methods. Enable global transaction with extensive currency and country coverage. - * Version: 1.1.0 + * Version: 1.2.0 * Author: WooCommerce * Author URI: https://woocommerce.com/ * License: GPL-2.0 From b15010fa6e8e3082b17efd2ac545a8c9cef210e4 Mon Sep 17 00:00:00 2001 From: "Jorge A. Torres" Date: Mon, 8 Mar 2021 17:38:29 -0300 Subject: [PATCH 5/5] Release 1.2.1 --- changelog.txt | 3 +++ composer.json | 2 +- package.json | 2 +- readme.txt | 5 ++++- woocommerce-paypal-payments.php | 2 +- 5 files changed, 10 insertions(+), 4 deletions(-) diff --git a/changelog.txt b/changelog.txt index e95138ec5..31998a915 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,8 @@ *** Changelog *** += 1.2.1 - 2021-03-08 = +* Fix - Address compatibility issue with Jetpack. + = 1.2.0 - 2021-03-08 = * Add - Rework onboarding code and add REST controller for integration with the OBW. #121 * Fix - Remove spinner on click, on cancel and on error. #124 diff --git a/composer.json b/composer.json index 3fdaf9e21..cec1c7724 100644 --- a/composer.json +++ b/composer.json @@ -5,7 +5,7 @@ "license": "GPL-2.0", "require": { "dhii/module-interface": "0.1", - "psr/container": "^1.0", + "psr/container": "1.0.0", "container-interop/service-provider": "^0.4.0", "dhii/containers": "v0.1.0-alpha1", "dhii/wp-containers": "v0.1.0-alpha1", diff --git a/package.json b/package.json index 3c046440f..4083adabb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "woocommerce-paypal-payments", - "version": "1.2.0", + "version": "1.2.1", "description": "WooCommerce PayPal Payments", "repository": "https://github.com/woocommerce/woocommerce-paypal-payments", "license": "GPL-2.0", diff --git a/readme.txt b/readme.txt index a11b59000..8ce11e1c8 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Tags: woocommerce, paypal, payments, ecommerce, e-commerce, store, sales, sell, Requires at least: 5.3 Tested up to: 5.6 Requires PHP: 7.0 -Stable tag: 1.2.0 +Stable tag: 1.2.1 License: GPLv2 License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -58,6 +58,9 @@ Follow the steps below to connect the plugin to your PayPal account: == Changelog == += 1.2.1 = +* Fix - Address compatibility issue with Jetpack. + = 1.2.0 = * Add - Rework onboarding code and add REST controller for integration with the OBW. #121 * Fix - Remove spinner on click, on cancel and on error. #124 diff --git a/woocommerce-paypal-payments.php b/woocommerce-paypal-payments.php index 37d605101..466831182 100644 --- a/woocommerce-paypal-payments.php +++ b/woocommerce-paypal-payments.php @@ -3,7 +3,7 @@ * Plugin Name: WooCommerce PayPal Payments * Plugin URI: https://woocommerce.com/products/woocommerce-paypal-payments/ * Description: PayPal's latest complete payments processing solution. Accept PayPal, PayPal Credit, credit/debit cards, alternative digital wallets local payment types and bank accounts. Turn on only PayPal options or process a full suite of payment methods. Enable global transaction with extensive currency and country coverage. - * Version: 1.2.0 + * Version: 1.2.1 * Author: WooCommerce * Author URI: https://woocommerce.com/ * License: GPL-2.0