mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-01 07:02:48 +08:00
Merge pull request #3067 from woocommerce/PCP-4122-unfortunately-your-credit-card-details-are-not-valid-shown-with-actually-valid-card-during-checkout-with-invalid-postcode
Unfortunately, your credit card details are not valid" shown with actually valid card during checkout with invalid postcode (4122)
This commit is contained in:
commit
51a2f4d4f9
1 changed files with 10 additions and 8 deletions
|
@ -56,9 +56,9 @@ class CardFieldsRenderer {
|
|||
onApprove( data ) {
|
||||
return contextConfig.onApprove( data );
|
||||
},
|
||||
onError( error ) {
|
||||
console.error( error );
|
||||
this.spinner.unblock();
|
||||
onError: ( error ) => {
|
||||
console.error( error );
|
||||
this.spinner.unblock();
|
||||
},
|
||||
} );
|
||||
|
||||
|
@ -105,11 +105,13 @@ class CardFieldsRenderer {
|
|||
}
|
||||
|
||||
cardFields.submit().catch( ( error ) => {
|
||||
this.spinner.unblock();
|
||||
console.error( error );
|
||||
this.errorHandler.message(
|
||||
this.defaultConfig.hosted_fields.labels.fields_not_valid
|
||||
);
|
||||
this.spinner.unblock();
|
||||
if (!error.type || error.type !== 'create-order-error') {
|
||||
console.error( error );
|
||||
this.errorHandler.message(
|
||||
this.defaultConfig.hosted_fields.labels.fields_not_valid
|
||||
);
|
||||
}
|
||||
} );
|
||||
} );
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue