ArunYogi / paytm-cordova-plugin

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

what we have to give in options parameter #1

Closed Govindghuge closed 6 years ago

Govindghuge commented 7 years ago

paytm.startPayment(options, successCallback, failureCallback); In the above line what we have to give in options parameter and the options should in what format .

Can you please provide process document so that it could be easy to install and use it

rvdfox commented 6 years ago

Below is the option i guessed, and it took me to next paytm page but had error:

var options = { "ENVIRONMENT":"STAGING", "ORDER_ID":"ORDER1234", "MID":"Test95358833097823", "CUST_ID":"CUSTABHJKAOIAUI", "CHANNEL_ID":"WAP", "INDUSTRY_TYPE_ID":"Retail", "WEBSITE":"paytm", "TXN_AMOUNT":"1.0", "THEME":"merchant" }

In this we are missing /generate_checksum and /verify_checksum option. not sure where to put them. I can see the issue was reported almost 2 months back,so if you got this worked , please help with options.

ArunYogi commented 6 years ago

Very sorry, Didn't see any mails from github for a verylong time. Expected options format is

{ "REQUEST_TYPE": "DEFAULT", "MID": "PAYTM_MERCHANT_ID", "ORDER_ID": "ORDER0000000001", "CUST_ID": "10000988111", "INDUSTRY_TYPE_ID": "PAYTM_INDUSTRY_TYPE_ID", "CHANNEL_ID": "WAP", "TXN_AMOUNT": "1", "WEBSITE": "PAYTM_WEBSITE", "CALLBACK_URL": "https://securegw.paytm.in/theia/paytmCallback?ORDER_ID=ORDER0000000001", "EMAIL": "abc@gmail.com", "MOBILE_NO": "9999999999", "ENVIRONMENT":"STAGING", "CHECKSUMHASH": "w2QDRMgp1/BNdEnJEAPCIOmNgQvsi+BhpqijfM9KvFfRiPmGSt3Ddzw+oTaGCLneJwxFFq5mqTMwJXdQE2EzK4px2xruDqKZjHupz9yXev4=" } Checksum has to be created before passing it the plugin as Paytm asks the consumer to take care of checksum generation and verification. Note: Checksum has to be created without "ENVIRONMENT" field. This field is for internal use only. I will improve the plugin code to be in proper way.