Uncaught ReferenceError: paypal is not defined

stephewaweru
Contributor
Contributor

Am getting this error when I try to integrate paypal javascript sdk in the html,

Uncaught ReferenceError: paypal is not defined at HTMLDocument.<anonymous> (checkout:1143:13) at mightThrow (jquery-3.5.1.js:3762:29) at process (jquery-3.5.1.js:3830:12).

In my master file I have placed the scripts in this order

&lt;script src="{{ asset('assets/frontuser/js/jquery-3.5.1.js') }}">&lt;/script&gt;

&lt;script src="https://www.paypal.com/sdk/js?client-id=paypalclientid&currency=USD" data-namespace="paypal_sdk">&lt;/script

&gt; &lt;script type="text/javascript" src="{{ asset('dist/frontend/assets/js/paypal.js')}}">&lt;/script&gt; //where the paypal SDK code is located

where might the error be coming from?

 

 

Login to Me Too
0 REPLIES 0

Haven't Found your Answer?

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