成功交易后的PayUMoney重定向页面 [英] PayUMoney redirecting page after successful transaction
问题描述
我正在使用PayUMoney事务开发示例应用程序.该应用程序运行良好.但是我正在寻找成功交易后将页面重定向到活动的方法.我正在使用payUMoney SDK是否有人通过过此程序?请指导我..任何形式的帮助表示赞赏.预先感谢
I am developing a sample application with PayUMoney Transaction. The app functions well. But I am looking for redirecting the page to an Activity after the successful transaction. I am using payUMoney SDK Does anyone gone through this? Please guide me.. any kind of help appreciated. Thanks in advance
推荐答案
我遇到了类似的问题.我假设您已经使用sdk集成了payUMoney.您的SDK将具有一个WebViewActivity,用于在转换完成后将用户重定向到成功/失败屏幕.在服务器端添加一个按钮,在成功/失败URL屏幕上命名为确定"或继续".在SDK的WebView活动中检测该按钮的单击,然后完成活动.
I faced the similar issue.I assume you have integrated payUMoney using sdk. Your sdk will be having a WebViewActivity which is used to redirect user to success/failure screen after transcation has been completed. Add a button on server side naming "ok" or "continue" on success/failure url screen.Detect click of that button in your SDK's WebView Activity and finish the activity.
要求您的Web开发人员在成功/失败网址上添加html按钮:
Ask your web developer to add an html button on success/failure url:
<button type="button" onclick="ok.performClick();">OK</button>
这是检测SDK的WebViewActivity中的html按钮的方法:
This is how you can detect click on an html button in WebViewActivity of your SDK:
mWebView = (WebView) findViewById(R.id.webview);
mWebView.getSettings().setJavaScriptEnabled(true);
mWebView.getSettings().setDomStorageEnabled(true);
mWebView.getSettings().setLoadWithOverviewMode(true);
mWebView.getSettings().setUseWideViewPort(true);
WebSettings ws = mWebView.getSettings();
mWebView.addJavascriptInterface(new Object()
{
@JavascriptInterface
public void performClick(String status)
{
// Deal with a click on the OK button
// Toast.makeText(mContext,"Payment Success",2000).show();
// Log.e("status payment-------->",status);
finish();
}
}, "ok");
这篇关于成功交易后的PayUMoney重定向页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!