Smart Payment Buttons Problem

Hareth14
Contributor
Contributor

Hello.

First I want to ask about using Smart Payment Buttons, is it safe 100% ?

I have been using them for a while suddenly today i see a problem that the buttons are not loading.

 

 

Uncaught Error: Attempted to load sdk version 5.0.63 on page, but version unknown already loaded.

To load this sdk alongside the existing version, please specify a different namespace in the script tag, e.g. , then use the paypal_sdk namespace in place of paypal in your code.

Uncaught TypeError: paypal.Buttons is not a function

 

 

Login to Me Too
4 REPLIES 4

bonehead9999
Contributor
Contributor

Having the same problem as of two days ago.

 

 

Attempted to load sdk version 5.0.65 on page, but version unknown already loaded

 

 

Using this as my script tag src (client-id removed)

https://www.paypal.com/sdk/js?currency=GBP&client-id=

 

Login to Me Too

tttc
New Community Member

Had the same problem. Turns out it was due to having an element on the page with the html ID of 'paypal' - in my case the container for the form.

Login to Me Too

jjttzz
Contributor
Contributor

Thank you!  This solved the problem for me.  I had an HTML element with the id "paypal" on my page, which the JS didn't like.   You'd think such an important detail like that would be included in the documentation.  

Login to Me Too

wilo_ahadi
Contributor
Contributor

I solved the problem like this :

 

1. Added "data-namespace" attribute to the script tag that loads PayPal SDK :

<script src="https://www.paypal.com/sdk/js?client-id=AfxLL8RXpurHInY6zjcDA6imSlrFGkgDs1nCArTInsxc-TZNfoPjAr6T43Tu..." data-namespace="paypal_sdk" ></script>

 

2. Setup the transaction :

paypal_sdk.Buttons().render('#paypal-button-container');

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.