question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Paypal Sandbox stuck at logging in loading issue

See original GitHub issue

Description

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 image

  • 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:closed
  • Created 4 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
bluepnumecommented, Oct 14, 2020

Hi,

Please make sure you have the www. in the paypal sdk url.

https://*www.*paypal.com/sdk/js?client-id=sb

1reaction
dshoulderscommented, Nov 9, 2020

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

PayPal Sandbox approval URL stuck in infinite loop
I have looped through the returned HATEOAS links and redirected the user to the approve URL ... Then the problem starts... API response...
Read more >
PayPal: Connection button gets stuck on loading and never ...
I've been performing some tests and was unable to connect my PayPal account to the payment field even using sandbox mode. The connection...
Read more >
Solved: sdk button stuck on 'Contacting the merchant to up...
It appears to be a sandbox only issue - but I really really want to test my PayPal button from start to finish...
Read more >
Paypal Stuck loading - Reddit
If you cannot log on: · Click Password and account access. · Click Login problems. · Click Call Us after “This information might...
Read more >
PayPal stuck in Submitting… loop - WordPress.org
I have Stripe integrated to the same form, and can submit a payment without issue. The page I need help with: [log in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found