mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
enable loginseller endpoint to switch between sandbox and live
This commit is contained in:
parent
6f870ec7a5
commit
09a5f0e466
3 changed files with 63 additions and 18 deletions
|
@ -1,4 +1,5 @@
|
|||
function onboardingCallback(authCode, sharedId) {
|
||||
const sandboxSwitchElement = document.querySelector('#ppcp-sandbox_on')
|
||||
fetch(
|
||||
PayPalCommerceGatewayOnboarding.endpoint,
|
||||
{
|
||||
|
@ -10,7 +11,8 @@ function onboardingCallback(authCode, sharedId) {
|
|||
{
|
||||
authCode: authCode,
|
||||
sharedId: sharedId,
|
||||
nonce: PayPalCommerceGatewayOnboarding.nonce
|
||||
nonce: PayPalCommerceGatewayOnboarding.nonce,
|
||||
env: sandboxSwitchElement && sandboxSwitchElement.checked ? 'sandbox' : 'production'
|
||||
}
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue