mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 09:08:09 +08:00
check in approve order endpoint whether card is disabled and return error message accordingly.
This commit is contained in:
parent
1dc9a05452
commit
c748c145db
4 changed files with 28 additions and 6 deletions
|
@ -10,7 +10,11 @@ const onApprove = (context, errorHandler) => {
|
|||
return res.json();
|
||||
}).then((data)=>{
|
||||
if (!data.success) {
|
||||
errorHandler.genericError();
|
||||
if (data.data.code === 100) {
|
||||
errorHandler.message(data.data.message);
|
||||
} else {
|
||||
errorHandler.genericError();
|
||||
}
|
||||
console.error(data);
|
||||
if (typeof actions.restart !== 'undefined') {
|
||||
return actions.restart();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue