简体   繁体   English

如何解决Android中的Paytm Session Expired失败错误?

[英]How to fix Paytm Session Expired failure error in android?

I'm integrating Paytm payment gateway in android application, I had followed all basic requirements and steps given by Paytm. 我正在Android应用程序中集成Paytm支付网关,我已经遵循了Paytm给出的所有基本要求和步骤。 also copy files from GitHub for generating checksum and verifychecksum. 还从GitHub复制文件以生成校验和和verifychecksum。 also set my merchant id and merchant key. 还设置我的商家ID和商家密钥。 but while integrating to android application it shows me error like: 1) This MID is not available in staging environment 2) Session Expired failure 3) Checksum mismatch. 但在集成到Android应用程序时,它向我显示如下错误:1)此MID在暂存环境中不可用2)会话过期失败3)校验和不匹配。

I'm had solved 1st error but not able to complete 2nd and 3rd i had already mailed to Paytm still not get any response from them. 我已经解决了第一个错误,但无法完成第二个和第三个我已经邮寄给Paytm仍然没有得到他们的任何回应。

I'm using Android studio, with XAMPP with gradle for Paytm is 我正在使用Android工作室,使用XAMPP和Grat for Paytm

implementation('com.paytm:pgplussdk:1.3.3') {
        transitive = true;
    }

here i share some sample code of android and php too. 在这里我也分享一些android和php的示例代码。

Android: 安卓:

 HashMap<String, String> paramMap = new HashMap<>();
    paramMap.put( "MID", paytm.getMID() );
    paramMap.put( "ORDER_ID", ordId );
    paramMap.put( "CUST_ID", "cust123" );
    paramMap.put( "MOBILE_NO", paytm.getUserPhone() );
    paramMap.put( "EMAIL", paytm.getUserEmail() );
    paramMap.put( "CHANNEL_ID", "WAP" );
    paramMap.put( "TXN_AMOUNT", "100.12" );
    paramMap.put( "WEBSITE", "WEBSTAGING" );
    paramMap.put( "INDUSTRY_TYPE_ID", "Retail" );
    paramMap.put( "CALLBACK_URL", paytm.getCallBackUrl() );
    paramMap.put( "CHECKSUMHASH", checksumHash );

Backend generateChecksum.php 后端generateChecksum.php

$paytmParams = array();
$paytmParams["MID"] = merchantMid;
$paytmParams["ORDER_ID"] = orderId;
$paytmParams["CUST_ID"] = custId;
$paytmParams["MOBILE_NO"] = mobileNo;
$paytmParams["EMAIL"] = email;
$paytmParams["CHANNEL_ID"] = channelId;
$paytmParams["TXN_AMOUNT"] = txnAmount;
$paytmParams["WEBSITE"] = website;
$paytmParams["INDUSTRY_TYPE_ID"] = industryTypeId;
$paytmParams["CALLBACK_URL"] = callbackUrl;

Issue resolved by Paytm. 问题由Paytm解决。 my staging merchant id is not working so i'm getting that kind of issue. 我的暂存商家ID没有工作,所以我遇到了这样的问题。

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

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