mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Merge pull request #517 from woocommerce/PCP-569-unprocessable-entity-when-paying
Display error message when hosted fields approve payment fails
This commit is contained in:
commit
b225430111
1 changed files with 4 additions and 1 deletions
|
@ -216,8 +216,11 @@ class CreditCardRenderer {
|
|||
this.spinner.unblock();
|
||||
return contextConfig.onApprove(payload);
|
||||
}).catch(err => {
|
||||
console.error(err);
|
||||
this.spinner.unblock();
|
||||
this.errorHandler.clear();
|
||||
if (err.details.length > 0) {
|
||||
this.errorHandler.message(err.details.map(d => `${d.issue} ${d.description}`).join('<br/>'), true);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.spinner.unblock();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue