mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-04 08:47:23 +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 ) {
|
onApprove( data ) {
|
||||||
return contextConfig.onApprove( data );
|
return contextConfig.onApprove( data );
|
||||||
},
|
},
|
||||||
onError( error ) {
|
onError: ( error ) => {
|
||||||
console.error( error );
|
console.error( error );
|
||||||
this.spinner.unblock();
|
this.spinner.unblock();
|
||||||
},
|
},
|
||||||
} );
|
} );
|
||||||
|
|
||||||
|
@ -105,11 +105,13 @@ class CardFieldsRenderer {
|
||||||
}
|
}
|
||||||
|
|
||||||
cardFields.submit().catch( ( error ) => {
|
cardFields.submit().catch( ( error ) => {
|
||||||
this.spinner.unblock();
|
this.spinner.unblock();
|
||||||
console.error( error );
|
if (!error.type || error.type !== 'create-order-error') {
|
||||||
this.errorHandler.message(
|
console.error( error );
|
||||||
this.defaultConfig.hosted_fields.labels.fields_not_valid
|
this.errorHandler.message(
|
||||||
);
|
this.defaultConfig.hosted_fields.labels.fields_not_valid
|
||||||
|
);
|
||||||
|
}
|
||||||
} );
|
} );
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue