mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Redirect to continuation when error happens
This commit is contained in:
parent
c3d46d89af
commit
15250e5a83
1 changed files with 1 additions and 4 deletions
|
@ -20,10 +20,7 @@ const onApprove = ( context, errorHandler ) => {
|
||||||
} )
|
} )
|
||||||
.then( ( data ) => {
|
.then( ( data ) => {
|
||||||
if ( ! data.success ) {
|
if ( ! data.success ) {
|
||||||
errorHandler.genericError();
|
location.href = context.config.redirect;
|
||||||
return actions.restart().catch( ( err ) => {
|
|
||||||
errorHandler.genericError();
|
|
||||||
} );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const orderReceivedUrl = data.data?.order_received_url;
|
const orderReceivedUrl = data.data?.order_received_url;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue