mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-04 08:47:23 +08:00
restart when onApprove fails
This commit is contained in:
parent
077d97d8f7
commit
ec680a7191
2 changed files with 2 additions and 2 deletions
|
@ -11,7 +11,7 @@ const onApprove = (context, errorHandler) => {
|
||||||
}).then((data)=>{
|
}).then((data)=>{
|
||||||
if (!data.success) {
|
if (!data.success) {
|
||||||
errorHandler.message(data.data);
|
errorHandler.message(data.data);
|
||||||
throw new Error(data.data);
|
return actions.restart();
|
||||||
}
|
}
|
||||||
location.href = context.config.redirect;
|
location.href = context.config.redirect;
|
||||||
});
|
});
|
||||||
|
|
|
@ -11,7 +11,7 @@ const onApprove = (context) => {
|
||||||
}).then((data)=>{
|
}).then((data)=>{
|
||||||
if (!data.success) {
|
if (!data.success) {
|
||||||
errorHandler.message(data.data);
|
errorHandler.message(data.data);
|
||||||
throw new Error(data.data);
|
return actions.restart();
|
||||||
}
|
}
|
||||||
document.querySelector('#place_order').click()
|
document.querySelector('#place_order').click()
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue