Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PayPal checkout integration with JS SDK Buttons - Problem with "Invalid sdk meta"

I'm trying to integrate PayPal Buttons with PayPal SDK on my FrontEnd. The SDK is loaded from

//www.paypal.com/sdk/js?client-id=<My-SandBox-Client-Id>

The script is loading correctly and when I do render buttons into my page it looks good as well. But there are 3 problems:

  1. Loading animation points are still hang at the bottom of the buttons: enter image description here
  2. In developer tools I can see the broken request (400) which says:
Invalid sdk meta: eyJ1cmwiOiIvL3d3dy5wYXlwYWwuY29tL3Nkay9qcz9jbGllbnQtaWQ9QWYtd0RUQlhVSjBFVE9hWWl6eXFVNDdPbVdxc0tvYmNpOVM1RzQya2FfR1RBeTZSR1pZNU1MUVBEdkw4VWJ0amx4QlJxdXMzWFBPNGUxWGEiLCJzdGFnZUhvc3QiOm51bGwsImFwaVN0YWdlSG9zdCI6bnVsbH0

Request is going to:

https://www.sandbox.paypal.com/smart/buttons?{private data}
  1. When clicking on any button, there is only spinning animation without loading any further data. No error message is provided.

I followed these integration guide: https://developer.paypal.com/docs/checkout/integrate/#2-add-the-paypal-script-to-your-web-page

I have also found the same question without any answer on PayPal Community page: https://www.paypal-community.com/t5/Merchant-services-Archive/Invalid-sdk-meta/m-p/1831011

I am wondering why PayPal doesn't help with integration on own community pages, and hope somebody here can help me to find out what is could be wrong.

like image 415
RuSsCiTy Avatar asked Nov 07 '25 16:11

RuSsCiTy


1 Answers

Found the solution: make sure you are including script from https://. Otherwise by loading from http:// script becomes a redirect to https:// and this runs in the described error above. So the correct link to the script is:

https://www.paypal.com/sdk/js?client-id=<My-SandBox-Client-Id>

Hopes it may help someone facing the same problem.

like image 125
RuSsCiTy Avatar answered Nov 09 '25 10:11

RuSsCiTy