mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 10:55:00 +08:00
send message when onboarding fails for some reason
This commit is contained in:
parent
792fce5b3a
commit
50aadf2507
2 changed files with 12 additions and 1 deletions
|
@ -9,5 +9,12 @@ function onboardingCallback(authCode, sharedId) {
|
|||
sharedId: sharedId,
|
||||
nonce: PayPalCommerceGatewayOnboarding.nonce
|
||||
})
|
||||
});
|
||||
})
|
||||
.then(response => response.json())
|
||||
.then((data) => {
|
||||
if (data.success) {
|
||||
return;
|
||||
}
|
||||
alert(PayPalCommerceGatewayOnboarding.error)
|
||||
});
|
||||
}
|
|
@ -46,6 +46,10 @@ class OnboardingAssets
|
|||
[
|
||||
'endpoint' => home_url(\WC_AJAX::get_endpoint(LoginSellerEndpoint::ENDPOINT)),
|
||||
'nonce' => wp_create_nonce($this->loginSellerEndpoint::nonce()),
|
||||
'error' => __(
|
||||
'We could not properly onboard you. Please reload and try again.',
|
||||
'woocommerce-paypal-commerce-gateway'
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue