Paypal Sandbox stuck at logging in loading issue
See original GitHub issueDescription
Please provide a short description of the issue here, along with: We are in Paypal Sandbox on clicking pay with paypal the screen does not go past the loading paypal login one.
-
Screenshots or videos that show the issue
-
Your code Node/Express APIs
//Create Payment
axios
.post(
`https://api.sandbox.paypal.com/v1/payments/payment`,
{
intent: 'sale',
payer: {
payment_method: 'paypal'
},
transactions: [
{
amount: {
total: amount,
currency: currency
}
}
],
redirect_urls: {
return_url: '<Our Redirect URL>',
cancel_url: '<Our Cancel URL>'
}
},
{
headers: {
'Access-Control-Allow-Credentials': true
},
auth: {
username: PAYPAL_CLIENT_ID,
password: PAYPAL_SECRET
}
}
)
.then(({ data }) => {
// Get and Store paymentID
})
//Execute Payment:
axios
.post(
`https://api.sandbox.paypal.com/v1/payments/payment/${paymentID}/execute`,
{
payer_id: payerID
},
{
headers: {
'Access-Control-Allow-Credentials': true
},
auth: {
username: PAYPAL_CLIENT_ID,
password: PAYPAL_SECRET
}
}
)
.then(async () => {
res.send({ status: 'success' })
})
-
The
paypal.version
from your browser console “4.0.309” -
The exact browser version Chrome Version 79.0.3945.130 (Official Build) (64-bit)
-
All console logs during the time of the issue, especially error messages The page with paypal login window does not load. No error messages on that windows console. In the original window: Request to post /create-payment failed with 504 error. Correlation id: unknown
-
Does the issue also occur at developer.paypal.com/demo/checkout?
-
Does the issue occur consistently, or intermittently? intermittently - works 1 in 5 times.
Steps to reproduce
Please provide each individual step required to reproduce the issue Call post requests with above code
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (3 by maintainers)
Hi,
Please make sure you have the
www.
in the paypal sdk url.https://*www.*paypal.com/sdk/js?client-id=sb
I was stuck on this too. The JavaScript SDK configuration page gives this example:
<script src="https://paypal.com/sdk/js?client-id=YOUR_CLIENT_ID"></script>
The provided script tag does not work.
After adding the
www.
it works as expected. Please could you update the docs page?https://developer.paypal.com/docs/business/javascript-sdk/javascript-sdk-configuration/#query-parameters