Ionic:在Inapp Browser中打开html内容 [英] Ionic: Opening html content in Inapp Browser
问题描述
我正在尝试将支付网关集成到Ionic移动应用中。我从服务器获取HTML代码,其中包含一个包含所有发布参数的表单,并在页面加载时提交以调用支付网关。
I'm trying to integrate payment gateway in an Ionic mobile app. I get the HTML code from the server which contains a form with all the post parameters and submit on page load to call the payment gateway.
-
如何使用HTML内容打开应用内浏览器?
How can I open the in-app browser with the HTML content?
交易完成后,支付网关将调用服务器URL&处理响应。我现在如何与Ionic应用程序进行通信以关闭应用内浏览器&显示回复?
After the transaction, the payment gateway will call the server URL & process the response. How can I now communicate back to Ionic app to close In-app browser & show the response?
推荐答案
查看 exceuteScript
Cordova In-App-Browser插件的Api。您应该能够
Check out the exceuteScript
Api of the Cordova In-App-Browser plugin. You should be able to
- 将所需的HTML添加到空文档中
- 轮询文档位置完成付款流程
这篇关于Ionic:在Inapp Browser中打开html内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!