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