Is it possible to import a given JS-Library (in my case it would be https://www.paypalobjects.com/webstatic/ppplus/ppplus.min.js from this .pdf file chapter 8.1 - "Integrating the payment wall")?
The text tells me the following:
1) Include JS library:
<script src="https://www.paypalobjects.com/webstatic/ppplus/ppplus.min.js"
type="text/javascript"></script>
2) Define a placeholder DIV:
<div id="ppplus"> </div>
3) Render Payment wall:
<script type="application/javascript">
var ppp = PAYPAL.apps.PPP({
"approvalUrl": "'.$approval_url.'",
"placeholder": "ppplus",
"mode": "sandbox",
"country": "DE"
});
</script>
Since I want to use this in a NativeScript application I cannot use the script
-Tag. My workaround would be to import this (if possible) like an usual module.
What I tried:
import * as "https://www.paypalobjects.com/webstatic/ppplus/ppplus.min.js"
but he can't find the given module (which seems kinda obvious, since it is no installed module itself). Is there any other way to do this?
PS: If you know any other way to include the wall, feel free to tell me, it might be a better idea than mine :).