0
我想在我們的電子商務Android應用程序中集成託管支付集成。請告訴我在Android應用程序中成功創建託管帳戶集成的所有步驟。在Android源代碼中創建託管支付集成的步驟
我想在我們的電子商務Android應用程序中集成託管支付集成。請告訴我在Android應用程序中成功創建託管帳戶集成的所有步驟。在Android源代碼中創建託管支付集成的步驟
整合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團隊提供。
謝謝先生給我答案,但我不明白,這是paytm交易,但我想知道有關託管帳戶。 1000是我們可以設置的默認價格。請告訴我,這可能是美國價格的工作。 –
您是否找到任何解決方案..? – usama