We are trying to implement Stripe integration with Salesforce by using Lightning Components for payments.
Stripe use an API for securely obtain the users card information. This API is for the client, so we have to import it as a script. The problem is that Lightning doesn't allow script tags, so we downloaded the JavaScript file from Stripe and added to the org as a static resource, then we added it with the ltng:require tag, but Stripe does not allow to use their API from another domain than stripe.com, so it didn't worked.
Then we tried to add a script tag with the url inside an aura:unescapedHtml, and it didn't worked again because we got the error "aura_prod.js:16 Refused to connect to 'https://js.stripe.com/v2/' because it violates the following Content Security Policy directive: "connect-src 'self'", directive set in the head tag, and it cannot be modified.
We are using Stripe API V2 because V3 doesn't work in lightning components, and if it worked, it would have the same problem.
Is there a way to use an external script in a lightning component?