Closed donwilly2010 closed 4 years ago
Integrating their SDK is more suitable in the app, if you want to use PayPal to pay on the app.
such as Android
https://github.com/paypal/PayPal-Android-SDK
https://github.com/braintree/braintree_android
Why did you close my issue without responding to my question??
The whole essense if using weex is to avoid using android SDK.
My question is not about PayPal. I never mentioned PayPal in my post. Please note that loading an external JavaScript into a JavaScript based framework such as Weex is a very key functionality. My question is how do we load an external JavaScript using document.createElement
or how can I do it if I can't use document??
Makes sure these boxes are checked befor submitting your issue - thank you!
[Yes] If you encounter any problems using the tool, please check if there has a new version to update(Run weex update [pluginname]@latest). [Yes] Check the FAQ, make sure there have not the same issue.
Weex is a fantastic Framework for Mobile development. But I need help while trying to load an external javascript page. this page will also need some parameters from props/data. This is required for payment integration such as loading a paypal card payment page into weex.
I tried using the following but it didnt work on Weex on Android:
var document=weex.document;
method: { loadPaymentPanel(){ var body = document.createElement('div', { classStyle: { alignItems: 'center' } })
body.appendChild(script) document.documentElement.appendChild(body)
paymentOptions = { amount : 2000, user: "mark", email: "mark@email.com, }
var window = document.getElementById(script).contentWindow
var handler = window.PaymentPop.setup(paymentOptions) if (!this.embed) { handler.openIframe() } }
}
*I got error the createElement is not a function.
*Please how else can I achieve what I want??