mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 16:24:33 +08:00
20 lines
No EOL
584 B
JavaScript
20 lines
No EOL
584 B
JavaScript
function onboardingCallback(authCode, sharedId) {
|
|
fetch(PayPalCommerceGatewayOnboarding.endpoint, {
|
|
method: 'POST',
|
|
headers: {
|
|
'content-type': 'application/json'
|
|
},
|
|
body: JSON.stringify({
|
|
authCode: authCode,
|
|
sharedId: sharedId,
|
|
nonce: PayPalCommerceGatewayOnboarding.nonce
|
|
})
|
|
})
|
|
.then(response => response.json())
|
|
.then((data) => {
|
|
if (data.success) {
|
|
return;
|
|
}
|
|
alert(PayPalCommerceGatewayOnboarding.error)
|
|
});
|
|
} |