ArunYogi / paytm-cordova-plugin

DEPRECATED Cordova plugin for Paytm application
6 stars 13 forks source link

Request for help for generating checksum #31

Closed dexterprabhakar closed 5 years ago

dexterprabhakar commented 5 years ago

Hi @YaMo97 @ArunYogi , We are trying to use this plugin for integration of paytm in our cordova application. We are stuck at checksum point and has no idea how it will be generated within mobile application.

Would be really helpful if anyone can guide us for the same.

Regards Prabhakar

ArunYogi commented 5 years ago

Checksum has to be constructed at backend. Paytm provides checksum creation and validation utilities based on the platform , you have build your backend system. check the list here https://github.com/Paytm-Payments?utf8=%E2%9C%93&q=checksum&type=&language=

dexterprabhakar commented 5 years ago

Hi Arun, Thanks for quick reply. We also thought so just needed affirmation. A small query, we do not understand where we have to do : Declare car paytm: any; As per docs it needs to be done in .ts file. There is no such declaration file in our cordova project.  Would appreciate your guidance . RegardsGet Outlook for Android From: ArunYogi notifications@github.com Sent: Saturday, August 31, 2019, 6:06 PM To: ArunYogi/paytm-cordova-plugin Cc: dexterprabhakar; Author Subject: Re: [ArunYogi/paytm-cordova-plugin] Request for help for generating checksum (#31)

Checksum has to be constructed at backend. Paytm provides checksum creation and validation utilities based on the platform , you have build your backend system.

check the list here https://github.com/Paytm-Payments?utf8=%E2%9C%93&q=checksum&type=&language=

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

dexterprabhakar commented 5 years ago

Hi @ArunYogi @YaMo97 any idea how to do this ?

Add below line to declaration.d.ts file

declare var paytm : any;

*we dont have any declaration.d.ts file

ArunYogi commented 5 years ago

Hi @ArunYogi @YaMo97 any idea how to do this ?

Add below line to declaration.d.ts file

declare var paytm : any;

*we dont have any declaration.d.ts file

Please refer this link https://github.com/ArunYogi/paytm-cordova-plugin/blob/master/README-IONIC.md

dexterprabhakar commented 5 years ago

thanks @ArunYogi but we are not in ionic. We are using cordova.

ArunYogi commented 5 years ago

thanks @ArunYogi but we are not in ionic. We are using cordova.

that's fine, the core concept is, you have to declare a global variable named "Paytm" at the start of the file (where you are accessing the payment details) and start calling method mentioned in read me file.

dexterprabhakar commented 5 years ago

Hi @ArunYogi @YaMo97 finally we have been able to access the paytm plugin. We are also able to start the transcation. The startPayment function starts the flow, opens the paytm payment page for a fraction of second and then sends the callback in success. In success we gets transcation failure because of invalid checksum.

Point to be highlighted here is the same web and backend code is working fine from website. we are able to make successful transcations from there but not from the plugin.

Your help will be really appriciated.

dexterprabhakar commented 5 years ago

Hi @ArunYogi we have sorted the issue with keys. the paytm plugin is working ok on android environment. Now we have issue with ios environment where its giving us missing key error with response code -1. we are sending txn amount as string only. any ideas what could be wrong ???

ArunYogi commented 5 years ago

@dexterprabhakar , please post the request u are sending to the plugin and simulator logs... With these information, I can assist you.

dexterprabhakar commented 5 years ago

Screenshot 2019-09-17 at 5 43 37 PM The first options are from my backend server. The second options are what i am sending to paytm plugin. last line is what am getting in failure callback

dexterprabhakar commented 5 years ago

@ArunYogi these are logs from xCode. something weird. as per these logs payTM plugin not found. Screenshot 2019-09-17 at 5 56 58 PM

ArunYogi commented 5 years ago

@dexterprabhakar , "CDVPlugin class PayTMCordova (pluginName:PaytM) does not exists" -> The plugin is not installed in iOS platform properly. Please remove and add the plugin.

Further I hope you are trying this in sandbox environment and not production.

dexterprabhakar commented 5 years ago

@ArunYogi thanks for the input.

  1. The plugin in earlier screenshot was not installed properly. PFA updated screenshot.
  2. This is production environment and same values are being sent from android. (Industry type, cust id and environment)
  3. Callback url is not used anywhere its website code fallback Screenshot 2019-09-17 at 6 08 03 PM
dexterprabhakar commented 5 years ago

@ArunYogi looks like it was customer id issue only. we changed it to string and its working now. Thanks for your support.

cheers