Merge branch 'trunk' into PCP-100-show-wc-message-on-account-creating-error

This commit is contained in:
Kirill Braslavsky 2021-03-11 15:58:52 +02:00
commit 661c9f3dfa
7 changed files with 27 additions and 9 deletions

View file

@ -1,5 +1,12 @@
*** 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
= 1.1.0 - 2021-02-01 =
* Add - Buy Now Pay Later for UK. #104
* Add - DE now has 12 month installments. #106

View file

@ -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",

View file

@ -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, {
@ -64,8 +61,12 @@ class CheckoutActionHandler {
return {
createOrder,
onApprove:onApprove(this, this.errorHandler, this.spinner),
onError: (error) => {
onCancel: () => {
spinner.unblock();
},
onError: () => {
this.errorHandler.genericError();
spinner.unblock();
}
}
}

View file

@ -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;
export default CreditCardRenderer;

View file

@ -1,6 +1,6 @@
{
"name": "woocommerce-paypal-payments",
"version": "1.1.0",
"version": "1.2.1",
"description": "WooCommerce PayPal Payments",
"repository": "https://github.com/woocommerce/woocommerce-paypal-payments",
"license": "GPL-2.0",

View file

@ -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.1
License: GPLv2
License URI: http://www.gnu.org/licenses/gpl-2.0.html
@ -58,6 +58,13 @@ 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
= 1.1.0 =
* Add - Buy Now Pay Later for UK. #104
* Add - DE now has 12 month installments. #106

View file

@ -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.1
* Author: WooCommerce
* Author URI: https://woocommerce.com/
* License: GPL-2.0