简体   繁体   English

集成 Paytm 支付网关 Android

[英]integration Paytm Payment Gateway Android

I am trying to integrate paytm's payment gateway to my Android App.我正在尝试将 paytm 的支付网关集成到我的 Android 应用程序中。 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.尝试通过邮件和电话联系 Paytm 团队......没有回应。 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:以下是我得到的输出日志中的错误 项目输出日志

So, Finally I was able to get through.所以,最后我能够通过。 Most Importantly you need to get in touch with Paytm's Ops team.最重要的是,您需要与 Paytm 的运营团队取得联系。 Contact the person who provided the Key & ID's and he will lead to the Tech/ops team.联系提供密钥和 ID 的人,他将领导技术/运营团队。 Share Logs with them.与他们分享日志。

mail them on: cmt.ops@paytm.com & tech.ops@paytm.com邮寄给他们:cmt.ops@paytm.com & tech.ops@paytm.com

For Paytm, setup Merchant Key on server side files (verifyChecksum.php & generateChecksum.php) .对于 Paytm,在服务器端文件(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.另外,请与支持人员一起检查 INDUSTRY_TYPE_ID"。错误的 INDUSTRY_TYPE_ID" 将导致您出现不同的错误。

Good Luck!!祝你好运!!

To integrate paytm on android app please add dependency in gradle file要将 paytm 集成到 android 应用程序中,请在 gradle 文件中添加依赖项

// paytm dependency
    implementation('com.paytm:pgplussdk:1.2.3') {
        transitive = true;
    }

Add Paytm Activity in android menifest file在androidmenifest文件中添加Paytm Activity

<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-要生成校验和,您不需要传递电子邮件 ID 和手机号码。您应该只传递 8 个参数,如下所示-

    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/您可以在此参考链接上找到分步流程 - https://www.blueappsoftware.com/paytm-payment-gateway-integration-android-studio/

Go to here .这里 Got the full paytm integration in android在android中获得了完整的paytm集成

Steps for Integration集成步骤

  1. Add dependency in the project在项目中添加依赖
  2. Add SMS Permission添加短信权限
  3. Generate Checksum生成校验和
  4. Verify Checksum验证校验和

according to my info you need authentication permissions from paytm without this you may not use it try to get it first.根据我的信息,您需要 paytm 的身份验证权限,否则您可能不会使用它尝试先获取它。 or the simple way is use webview and embed paytm link in it and let the user directly interact with it.或者简单的方法是使用 webview 并在其中嵌入 paytm 链接,让用户直接与之交互。

Try this answer :试试这个答案:

Go and open this link .去打开这个链接

1) Download Android+SDK 1) 下载Android+SDK

2) After downloading it , you will get pgsdk.jar in it and also put in your project folder. 2) 下载后,您将在其中获得pgsdk.jar并放入您的项目文件夹中。

3) Now put their code. 3)现在把他们的代码。

4) In their code, they ask for ChecksumGenerator and ValidateChksum URL which are for testing purpose. 4) 在他们的代码中,他们要求提供用于测试目的的 ChecksumGenerator 和 ValidateChksum URL。 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.您可以通过联系 paytm 开发支持团队获得它,他们将为您提供校验和生成和校验和验证代码,包括商家 ID 以及您需要在服务器中部署的所有必要内容。

And after successfully integration might be your problem get solved.成功集成后,您的问题可能会得到解决。

See Below link for Knowing some facts regarding PayTm.请参阅以下链接了解有关 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://www.quora.com/How-do-I-integrate-Paytm-wallet-in-an-Android-application-as-a-payment-option-just-like-in-the-Uber-app

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM