2

I'm trying to integrate Paytm in my android application,

When I try to Initiate Transaction API as per documnetation in https://developer.paytm.com/docs/initiate-transaction-api/ I get this error:

Type com.paytm.pg.AppTest is defined multiple times: /home/gowthamn/.gradle/caches/transforms-2/files-2.1/80727521e63bd8147327c9aae576f6b7/jetified-PaytmChecksum.jar:com/paytm/pg/AppTest.class, /home/gowthamn/.gradle/caches/transforms-2/files-2.1/80727521e63bd8147327c9aae576f6b7/jetified-PaytmChecksum.jar:target/test-classes/com/paytm/pg/AppTest.class.

Changes I did in Code are mentioned below:

I added implementation 'com.paytm.appinvokesdk:appinvokesdk:1.2' in app level build.gradle.

I added maven { url "https://artifactory.paytm.in/libs-release-local" } in project level build.gradle

Also paytmchecksum.jar file from https://github.com/Paytm-Payments/Paytm_Web_Sample_Kit_Java/tree/master/Java%20Kit%201.8

I have searched in google about this error. Some suggested to remove the paytmchecksum.jar file.

But if I remove the jar file, I don't find CheckSumServiceHelper.java in code which is used to genrate checksum.

3 Answers3

1

After long research I found that CHECKSUM cannot be generated from android locally.

Don't know the reason but when I used xampp to generate CHECKSUM, it worked.

0

We do not recommend to generate checksum at App side, Checksum should be generate at server side.

0

As per paytm official document, init_transaction token must be generate on your server only.

Second thing you don't need to add checksum.jar file because the checksum and transaction token both are different. In paytm All-in-one SDK you need to get transaction token not checksum.

So please use your server to generate transaction token. You can get generate transaction token php code and android code from here

Kamal Bunkar
  • 1,354
  • 1
  • 16
  • 20