Reputation: 466
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:
Invalid sdk meta: eyJ1cmwiOiIvL3d3dy5wYXlwYWwuY29tL3Nkay9qcz9jbGllbnQtaWQ9QWYtd0RUQlhVSjBFVE9hWWl6eXFVNDdPbVdxc0tvYmNpOVM1RzQya2FfR1RBeTZSR1pZNU1MUVBEdkw4VWJ0amx4QlJxdXMzWFBPNGUxWGEiLCJzdGFnZUhvc3QiOm51bGwsImFwaVN0YWdlSG9zdCI6bnVsbH0
Request is going to:
https://www.sandbox.paypal.com/smart/buttons?{private data}
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.
Upvotes: 4
Views: 1673
Reputation: 11
I encountered this issue on Drupal and found that the Advanced Aggregation module was removing the https://
and causing the bug as
RuSsCiTy mentioned.
Specifically, I needed to disable the "Convert absolute paths to protocol relative paths" (under "Obscure options"):
Upvotes: 1
Reputation: 466
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.
Upvotes: 5