Getting result back of webview operation

2019-08-06 03:02发布

I am implementing payment functionality in my application. For that, I am launching my website's payment page with new intent (startActivityForResult) on a click of a button from my application. Once the payment is succeed, I want that webview to be closed automatically and should get succeed of failed result back in calling activity. Is it possible and if yes, how can I achieve this?

1条回答
干净又极端
2楼-- · 2019-08-06 03:14

I am not completely aware of your use case. If are are just trying to accept credit cards or accept paypal as a form of payment, check out https://github.com/paypal/PayPal-Android-SDK and check out the https://github.com/paypal/PayPal-Android-SDK/tree/master/SampleApp. The sdk takes care of redirection to PayPal for you so that you do not need to implement that yourself via an webview.

查看更多
登录 后发表回答