Uncaught ReferenceError: paypal is not defined
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
<script src="{{ asset('assets/frontuser/js/jquery-3.5.1.js') }}"></script>
<script src="https://www.paypal.com/sdk/js?client-id=paypalclientid¤cy=USD" data-namespace="paypal_sdk"></script
> <script type="text/javascript" src="{{ asset('dist/frontend/assets/js/paypal.js')}}"></script> //where the paypal SDK code is located
where might the error be coming from?

Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- paypal buttons can't show in PayPal Payments Standard
- Paypal is not defined (errorr) when making the payment integration live in PayPal Payments Standard
- Error when using code for Smart Paypal Button in PayPal Payments Standard
- Pre built checkout solution error. - fails with Uncaught ReferenceError: paypal is not defined in REST APIs