我幾乎集成paytm支付網關具有以下this link什麼是android中的paytm支付網關集成中的客戶端證書?
是什麼paytm支付網關集成客戶端證書?他們提到它應該包括在原始文件夾中。我在哪裏可以獲得客戶端證書?
FYI:客戶端證書甚至沒有the sample paytm integration app
我幾乎集成paytm支付網關具有以下this link什麼是android中的paytm支付網關集成中的客戶端證書?
是什麼paytm支付網關集成客戶端證書?他們提到它應該包括在原始文件夾中。我在哪裏可以獲得客戶端證書?
FYI:客戶端證書甚至沒有the sample paytm integration app
包括你可以把它當作空。它也在文檔中提到
inCertificate是持有證書信息的對象。 通過這個爲空,如果沒有客戶端證書由商家使用(如上面的先決條件部分給出 )
我建議你使用PGSDK 2.0,而不是舊版本不要求任何客戶端證書
----------
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
PaytmButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
getPaytmWindow() ;
}
});
}
}
private void getPaytmWindow(String checksum) {
//use PaytmPGService Service = PaytmPGService.getProductionService();in production//
PaytmPGService Service = PaytmPGService.getStagingService();
//Kindly create complete Map and checksum on your server side and then put it here in paramMap.
Map<String, String> paramMap = new HashMap<String, String>();
paramMap.put("MID", abc14146028455452");
paramMap.put("ORDER_ID", "GTR6079");
paramMap.put("CUST_ID", "1132");
paramMap.put("INDUSTRY_TYPE_ID", "Retail");
paramMap.put("CHANNEL_ID", "WAP");
paramMap.put("TXN_AMOUNT", "76");
paramMap.put("WEBSITE", "APP_STAGING");
paramMap.put("EMAIL", "[email protected]");
paramMap.put("MOBILE_NO", "7777777777");
paramMap.put("CALLBACK_URL", "https://pguat.paytm.com/paytmchecksum/paytmCallback.jsp");
paramMap.put("CHECKSUMHASH", "DkrZCCNCKS0h4IbLEk8HWqTClr6PCK/+Zh3xyW7fXfOsfHsmhmt3/wGx5pxgWrCSNCObPHyYFE3VJob0v7QQdkBFNyNAO7CR2+e2BiVgQpM=");
PaytmOrder Order = new PaytmOrder(paramMap);
Service.initialize(Order, null);
Service.startPaymentTransaction(this, true, true,
new PaytmPaymentTransactionCallback() {
@Override
public void someUIErrorOccurred(String inErrorMessage) {
// Some UI Error Occurred in Payment Gateway Activity.
// // This may be due to initialization of views in
// Payment Gateway Activity or may be due to //
// initialization of webview. // Error Message details
// the error occurred.
Log.d("LOG123444", "someUIErrorOccurred : " + inErrorMessage);
}
@Override
public void onTransactionResponse(Bundle inResponse) {
Log.d("LOG123444", "Payment Transaction : " + inResponse);
if (inResponse.getString("STATUS").contains("TXN_SUCCESS"))
{
Toast.makeText(getApplicationContext(),"Transaction completed",Toast.LENGTH_LONG).show();
}
Log.i("LOG123444", inResponse.getString("STATUS") );
// Toast.makeText(getApplicationContext(), "Payment Transaction response " + inResponse.toString(), Toast.LENGTH_LONG).show();
}
@Override
public void networkNotAvailable() {
// If network is not
// available, then this
// method gets called.
}
@Override
public void clientAuthenticationFailed(String inErrorMessage) {
// This method gets called if client authentication
// failed. // Failure may be due to following reasons //
// 1. Server error or downtime. // 2. Server unable to
// generate checksum or checksum response is not in
// proper format. // 3. Server failed to authenticate
// that client. That is value of payt_STATUS is 2. //
// Error Message describes the reason for failure.
Log.i("LOG123444", "clientAuthenticationFailed " + inErrorMessage);
}
@Override
public void onErrorLoadingWebPage(int iniErrorCode,
String inErrorMessage, String inFailingUrl) {
Log.i("LOG", "inErrorMessage " + inErrorMessage);
Log.i("LOG", "inFailingUrl " + inFailingUrl);
}
// had to be added: NOTE
@Override
public void onBackPressedCancelTransaction() {
// TODO Auto-generated method stub
}
@Override
public void onTransactionCancel(String inErrorMessage, Bundle inResponse) {
Log.d("LOG", "Payment Transaction Failed " + inErrorMessage);
Toast.makeText(getBaseContext(), "Payment Transaction Failed ", Toast.LENGTH_LONG).show();
}
});
}
如果我使用空它顯示**客戶證書沒有被發現**在交易的過程中停止爲'不能發佈/' – jafarbtech
你能發佈完整的錯誤日誌?開發者在集成PayTm網關時遇到的主要問題是散列問題 –
你說的是完全正確的。而且我通過發送錯誤的手機號碼(不是10位數字)而犯了一個錯誤。在我的情況下,這是錯誤。任何方式感謝你:) – jafarbtech