mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-04 08:47:23 +08:00
Merge branch 'trunk' into PCP-66-unblock-ui-on-submit-checkout-error
This commit is contained in:
commit
f7bd7de3c8
25 changed files with 945 additions and 136 deletions
|
@ -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,8 +50,12 @@ class CheckoutActionHandler {
|
|||
return {
|
||||
createOrder,
|
||||
onApprove:onApprove(this, this.errorHandler, this.spinner),
|
||||
onError: (error) => {
|
||||
onCancel: () => {
|
||||
spinner.unblock();
|
||||
},
|
||||
onError: () => {
|
||||
this.errorHandler.genericError();
|
||||
spinner.unblock();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue