- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We have used Connect To PayPal to build our websites for 4 years, and built dozens of websites successfully.
Recently we observed that our websites stopped showing the button.
The issue is inconsistent, however. One run on browser could show the button, and next run could fail.
When it failed, it failed on this line: paypal.use( ['login'], function (login) {
When it is successful, https://www.paypalobjects.com/js/external/connect/login.js is happily loaded.
When it failed, https://mywebsite.com/mywebapp/login.js is loaded, and would surely fail.
We used other tracking scripts such as Google Tag Manager, Osano. If we removed those other tracking scripts, the problem would be gone. However, our business mandated that we use them. Please help!
<span id='cwppButton'></span>
<script src='https://www.paypalobjects.com/js/external/connect/api.js'></script>
<script>
paypal.use( ['login'], function (login) {
login.render ({
"appid":"MyPayPalClientID",
"authend":"sandbox",
"scopes":"profile address email https://uri.paypal.com/services/paypalattributes",
"containerid":"cwppButton",
"responseType":"code",
"locale":"en-us",
"buttonType":"CWP",
"buttonShape":"pill",
"buttonSize":"lg",
"returnurl":"MyPayPalReturnURL"
});
});
</script>
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Just in case anybody care, I solved the issue myself. I updated the following line:
<script src='https://www.paypalobjects.com/js/external/connect/api.js'></script>
to
<script id="paypal-api" src='https://www.paypalobjects.com/js/external/connect/api.js'></script>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Just in case anybody care, I solved the issue myself. I updated the following line:
<script src='https://www.paypalobjects.com/js/external/connect/api.js'></script>
to
<script id="paypal-api" src='https://www.paypalobjects.com/js/external/connect/api.js'></script>

Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- Security Heading Error When Trying To Connect My PayPal account to my website in NVP/SOAP APIs
- I've recently started using Ionos as a Website provider in Sandbox Environment
- a donor made a donation before website completed plugin paypal connection. do they need to resend in PayPal Payments Standard
- Unable to connect my wordpress website with PayPal in PayPal Payments Standard