integration Paytm Payment Gateway Android

20,423

Solution 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: [email protected] & [email protected]

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!!

Solution 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/

Solution 3

Go to here. Got the full paytm integration in android

Steps for Integration

  1. Add dependency in the project
  2. Add SMS Permission
  3. Generate Checksum
  4. Verify Checksum
Share:
20,423
VipiN Negi
Author by

VipiN Negi

/// Vipin's Profile /// /// Developer &amp; Designer /// class Vipin implements Developer, Designer { final String name = 'Vipin K Negi'; final String email = '[email protected]'; List&lt;String&gt; get languages =&gt; [ 'java', 'dart', 'javascript', ]; List&lt;String&gt; get technologies =&gt; [ 'flutter', 'node.js', 'mysql', 'mongodb', ]; List&lt;String&gt; get tools =&gt; [ 'Android Studio', 'XCode', 'VS Code', 'Postman', 'HiediSQL', 'Sequel Ace', 'Adobe Photoshop', 'Adobe XD', 'Adobe Illustrator', ]; List&lt;String&gt; get OS =&gt; [ 'Windows 10', 'MacOS Big Sur', ]; }

Updated on July 09, 2022

Comments

  • VipiN Negi
    VipiN Negi almost 2 years

    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", "[email protected]");
    paramMap.put("MOBILE_NO", "9876543210");
    paramMap.put("THEME", "merchant");
    

    Below is the Error in output log I am getting: project output log