Paytm integration with fast 3.0

I want to integrate paytm payment gateway with swift 3.0 . I just follow the github link. but I have probelm in ["CHECKSUMHASH"] = "". What can I add to this key.

 orderDict["MID"] = strMid orderDict["ORDER_ID"] = strOrderId orderDict["CUST_ID"] = strCustomerId orderDict["INDUSTRY_TYPE_ID"] = strIndustryType orderDict["CHANNEL_ID"] = strChanalID orderDict["TXN_AMOUNT"] = strAmt orderDict["WEBSITE"] = strWebsite orderDict["CALLBACK_URL"] = "http://xxxxx.co.in/verifyChecksum.php" orderDict["CHECKSUMHASH"] = "" 

This gives me an invalid checksum, please tell me how I can create a checksum.

+5
source share
1 answer

First of all, you can call your api server to create a checksum. If you are using Almofire then call

 var parameters:[String:String]? parameters = ["MID":strMid,"ORDER_ID":strOrderId ,"INDUSTRY_TYPE_ID":strIndustryType,"CHANNEL_ID":strChanalID,"TXN_AMOUNT":strAmt,"WEBSITE":strWebsite, "CUST_ID":strCustomerId,"CALLBACK_URL":"http://xxxxxxx.co.in/verifyChecksum.php"] showHud(self.view) print(parameters) Alamofire.request("http://xxxxxx.co.in/generateChecksum.php", method: .post, parameters: parameters,encoding: URLEncoding.default, headers: nil).responseJSON {} 

Please pass all parameter in this api. It gives below response

 { "CHECKSUMHASH": "xxxxxxxxxxxxx", "ORDER_ID": "xxxxxxxx", "payt_STATUS": "1" } 

In this Dictionary you will receive CHECKSUMHASH It Pass in paytm order .

+4
source

Source: https://habr.com/ru/post/1266454/


All Articles