mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 18:16:38 +08:00
add onApprove endpoint to store order in session
This commit is contained in:
parent
7c2bc5a8da
commit
5824a40a08
10 changed files with 128 additions and 13 deletions
|
@ -1,4 +1,4 @@
|
|||
|
||||
import onApprove from "./onApprove";
|
||||
|
||||
class CartConfig {
|
||||
|
||||
|
@ -26,12 +26,9 @@ class CartConfig {
|
|||
return data.data.id;
|
||||
});
|
||||
}
|
||||
const onApprove = (data, actions) => {
|
||||
return actions.redirect(this.config.redirect);
|
||||
}
|
||||
return {
|
||||
createOrder,
|
||||
onApprove,
|
||||
onApprove:onApprove(this),
|
||||
onError: (error) => {
|
||||
this.errorHandler.message(error);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue