- payment : first date error corrected
- payment : added httpErrorException - payment : error handling wip - profil page restriction gives access to admin and editor
This commit is contained in:
@@ -33,6 +33,8 @@ export async function onApprove(data, actions) {
|
||||
return actions.restart();
|
||||
} else if (errorDetail) {
|
||||
// (2) Other non-recoverable errors -> Show a failure message
|
||||
console.log("errorDetail:");
|
||||
console.log(errorDetail);
|
||||
throw new Error(`${errorDetail.description} (${orderData.debug_id})`);
|
||||
} else if (!orderData.purchase_units) {
|
||||
throw new Error(JSON.stringify(orderData));
|
||||
@@ -51,7 +53,7 @@ export async function onApprove(data, actions) {
|
||||
orderData,
|
||||
JSON.stringify(orderData, null, 2),
|
||||
);
|
||||
//actions.redirect(PLGNTLS_data.paypal_redirection_success);
|
||||
actions.redirect(PLGNTLS_data.paypal_redirection_success);
|
||||
} catch (error) {
|
||||
console.error("payment ok but error on traitment afterwards : ", error);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user