我想将 Escrow Payment Integration 集成到我们的电子商务 Android 应用程序中。请告诉我在 android 应用程序中成功创建 Escrow Account 集成的所有步骤。
问问题
962 次
1 回答
0
像这样集成paytym..
Random randomGenerator = new Random();
randomInt = randomGenerator.nextInt(1000);
//for testing environment
Service = PaytmPGService.getStagingService();
PaytmMerchant Merchant = new PaytmMerchant("https://pguat.paytm.com/merchant-chksum/ChecksumGenerator","https://pguat.paytm.com/merchant-chksum/ValidateChksum");
Log.e("value","value");
Map<String, String> paramMap = new HashMap<String, String>();
//these are mandatory parameters
paramMap.put("REQUEST_TYPE", "DEFAULT");
paramMap.put("ORDER_ID", String.valueOf(randomInt));
//MID provided by paytm
paramMap.put("MID", "id provided by paytm");
paramMap.put("CUST_ID", "CUST123");
paramMap.put("CHANNEL_ID", "WAP");
paramMap.put("INDUSTRY_TYPE_ID", "Retail");
paramMap.put("WEBSITE", "paytm");
paramMap.put("TXN_AMOUNT", "1");
paramMap.put("THEME", "merchant");
PaytmOrder Order = new PaytmOrder(paramMap);
Service.initialize(Order, Merchant,null);
Log.e("value1111","value");
Service.startPaymentTransaction(this, true, true, new PaytmPaymentTransactionCallback() {
@Override
public void onTransactionSuccess(Bundle bundle) {
app.getLogger().error("Transaction Success :" + bundle);
Log.e("Transaction Success :",""+bundle);
}
@Override
public void onTransactionFailure(String s, Bundle bundle) {
app.getLogger().error("Transaction Failure :" + s + "\n" + bundle);
Log.e("Transaction Failure :",s+" "+bundle);
}
@Override
public void networkNotAvailable() {
app.getLogger().error("network unavailable :");
Log.e("network unavailable :","network unavailable : ");
}
@Override
public void clientAuthenticationFailed(String s) {
app.getLogger().error("clientAuthenticationFailed :" + s);
Log.e("clientAuthenticationFailed :",s+" ");
}
@Override
public void someUIErrorOccurred(String s) {
app.getLogger().error("someUIErrorOccurred :" + s);
Log.e("someUIErrorOccurred :",s+" ");
}
@Override
public void onErrorLoadingWebPage(int i, String s, String s2) {
app.getLogger().error("errorLoadingWebPage :" + i + "\n" + s + "\n" + s2);
Log.e("errorLoadingWebPage :",i+" "+s+" "+s2);
}
});
}
ChecksumGenerator
并由ValidateChksum
paytym 团队提供。
于 2015-08-25T05:46:59.447 回答