Paypal-checkout-components: Paypal Sandbox stuck at logging in loading issue

Created on 19 Feb 2020  路  6Comments  路  Source: paypal/paypal-checkout-components

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

Most helpful comment

Hi,

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

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

All 6 comments

Can you please try with the latest sdk version and let us know if you're still seeing issues. Thanks.

We met the same problem. It works great on an iOS simulator but keeps loading on iOS devices. We use the official JS SDK.

Iam facing the same issue.

The console output:
Invalid sdk meta: eyJ1cmwiOiJodHRwczovL3BheXBhbC5jb20vc2RrL2pzP2NsaWVudC1pZD1zYiIsImF0dHJzIjp7ImRhdGEtdWlkIjoiYTdhNzkxOTEyNl9tZGE2bXR5Nm16aSJ9fQ

The problem is the sdkMeta HTTP Parameter. Without this parameter everthing is working fine. But you can't override this param by yourself. So its only working theoretically without this param.

Here is the issue also mentioned:
https://www.paypal-community.com/t5/Merchant-services-Archive/Invalid-sdk-meta/m-p/1831011#
But also no solution...

My specs:
Angular: 9.1.12
NodeJS: 10.29.0
Chrome: 86.0.4240.75 (Browser version should be irrelevant)

Its not working with the default client-id and the added app client-id for me.

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

Yikes! Thanks @dshoulders. We'll fix that.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

VivekVikranth picture VivekVikranth  路  6Comments

hosseinfs picture hosseinfs  路  6Comments

JeromeDeLeon picture JeromeDeLeon  路  4Comments

stephen-last picture stephen-last  路  6Comments

Wr4i7h picture Wr4i7h  路  4Comments