问题
I am trying to integrate paytm's payment gateway to my Android App. I can't seem to find any proper documentations or procedures on their website. I've checked every lead on this through google but no help. Tried contacting the Paytm team through mail and phone .. no response. now I am stuck here.
here's what I am passing :
paramMap.put("REQUEST_TYPE", "DEFAULT");
paramMap.put("ORDER_ID", String.valueOf(randomInt));
paramMap.put("MID", "************2343");
paramMap.put("CUST_ID", "CUST123");
paramMap.put("CHANNEL_ID", "WAP");
paramMap.put("INDUSTRY_TYPE_ID", "Retail");
paramMap.put("WEBSITE", "frshlrfowap");
paramMap.put("TXN_AMOUNT", "1");
paramMap.put("EMAIL", "testing@gmail.com");
paramMap.put("MOBILE_NO", "9876543210");
paramMap.put("THEME", "merchant");
Below is the Error in output log I am getting:
回答1:
So, Finally I was able to get through. Most Importantly you need to get in touch with Paytm's Ops team. Contact the person who provided the Key & ID's and he will lead to the Tech/ops team. Share Logs with them.
mail them on: cmt.ops@paytm.com & tech.ops@paytm.com
For Paytm, setup Merchant Key on server side files (verifyChecksum.php & generateChecksum.php). My Issue was, My client provided different Merchant Key (may be Sandbox one) which lead me to "Client Authentication failed". After Sharing Logs with their team they provided the Correct Key and I started getting correct response from the server. Also, check for INDUSTRY_TYPE_ID" with the support guys. Wrong INDUSTRY_TYPE_ID" will lead you to the different error.
Good Luck!!
回答2:
To integrate paytm on android app please add dependency in gradle file
// paytm dependency
implementation('com.paytm:pgplussdk:1.2.3') {
transitive = true;
}
Add Paytm Activity in android menifest file
<activity android:name="com.paytm.pgsdk.PaytmPGActivity"
android:screenOrientation="portrait" android:configChanges="keyboardHidden|orientation|keyboard"/>
To generate checksum you don't need to pass email id and mobile number.You should pass only 8 param as below-
String url ="https://www.blueappsoftware.com/payment/payment_paytm/generateChecksum.php";
String varifyurl = "https://pguat.paytm.com/paytmchecksum/paytmCallback.jsp";
String param=
"MID="+mid+
"&ORDER_ID=" + orderId+
"&CUST_ID="+custid+
"&CHANNEL_ID=WAP&TXN_AMOUNT=100&WEBSITE=WEBSTAGING"+
"&CALLBACK_URL="+ varifyurl+"&INDUSTRY_TYPE_ID=Retail";
Please check this reference link. You can find step by step process on this reference link- https://www.blueappsoftware.com/paytm-payment-gateway-integration-android-studio/
回答3:
according to my info you need authentication permissions from paytm without this you may not use it try to get it first. or the simple way is use webview and embed paytm link in it and let the user directly interact with it.
回答4:
Try this answer :
Go and open this link.
1) Download Android+SDK
2) After downloading it , you will get pgsdk.jar in it and also put in your project folder.
3) Now put their code.
4) In their code, they ask for ChecksumGenerator and ValidateChksum URL which are for testing purpose. You can get it by contacting to paytm development support team and they will give you checksum generation and checksum validation code including merchant id and all necessary things that you need to deploy in your server.
And after successfully integration might be your problem get solved.
See Below link for Knowing some facts regarding PayTm.
https://www.quora.com/How-do-I-integrate-Paytm-wallet-in-an-Android-application-as-a-payment-option-just-like-in-the-Uber-app
来源:https://stackoverflow.com/questions/33384872/integration-paytm-payment-gateway-android