mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
move module.local to module
This commit is contained in:
parent
c443e4053c
commit
f8e82bdfaf
217 changed files with 8 additions and 2 deletions
27
modules/ppcp-onboarding/assets/js/onboarding.js
Normal file
27
modules/ppcp-onboarding/assets/js/onboarding.js
Normal file
|
@ -0,0 +1,27 @@
|
|||
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 )
|
||||
}
|
||||
);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue