mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-07 18:00:15 +08:00
Do not use timeout but return a promise on onApprove
This commit is contained in:
parent
c973871980
commit
eaca9f6a41
2 changed files with 2 additions and 15 deletions
|
@ -22,8 +22,8 @@ export async function createOrder() {
|
|||
});
|
||||
}
|
||||
|
||||
export function onApprove(data) {
|
||||
fetch(config.scriptData.ajax.approve_order.endpoint, {
|
||||
export async function onApprove(data) {
|
||||
return fetch(config.scriptData.ajax.approve_order.endpoint, {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue