I am trying to integrate paypal express checkout into my lightning community website.

I included the following line in my lightning component to load the javascript

<ltng:require scripts="https://www.paypalobjects.com/api/checkout.js" afterScriptsLoaded="{!c.scriptsLoaded}"/>

However, there appears to be a problem loading the script. scriptsLoaded() function in my controller never get called.

I see the following error in the browser console on page load.

Refused to connect to 'https://www.paypalobjects.com/api/checkout.js' because it violates the following Content Security Policy directive: "connect-src 'self' https://api.bluetail.salesforce.com https://staging.bluetail.salesforce.com https://preprod.bluetail.salesforce.com *.cs43.visual.force.com".

Note: i already added "'https://www.paypalobjects.com" to the remote site settings

1 Answer 1


I've also faced case with problem with similar error. But for me, source of issue was using of fetch method in JS. Adding endpoint to CSP Trusted Sites and Remote Site Settings may be a solution of similar problems, as it was in my case. See additional info: Configure Remote Site Settings, Adding Remote Site Settings, Create CSP Trusted Sites to Access Third-Party APIs

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .