Created
November 29, 2022 07:27
-
-
Save vineyrawat/5a8c205bcfadbbeff7eeee7344d06948 to your computer and use it in GitHub Desktop.
Generating PayU Link Using Deluge in Zoho Applications.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// used variables | |
phone = 9675705065; | |
amount = 1; | |
email = "[email protected]"; | |
name = "Vinay Rawat"; | |
txnid = "51"; | |
// request details | |
data = Map(); | |
salt = "PayU_Salt"; | |
key = "PayU_Key"; | |
url = "https://info.payu.in/merchant/postservice.php?form=2"; | |
headers = Map(); | |
headers.put("Content-Type","application/x-www-form-urlencoded"); | |
var1 = Map(); | |
var1.put("amount",amount); | |
var1.put("email",email); | |
var1.put("phone",phone); | |
var1.put("send_sms","1"); | |
var1.put("productinfo","SERVICE CHARGE"); | |
var1.put("txnid",txnid); | |
var1.put("firstname",name); | |
hash = zoho.encryption.SHA512(key + "|create_invoice|" + var1.toString() + "|" + salt); | |
data.put("var1",var1); | |
data.put("command","create_invoice"); | |
data.put("key",key); | |
data.put("hash",hash); | |
info data; | |
response = invokeurl | |
[ | |
url :url | |
type :POST | |
parameters:data | |
headers:headers | |
]; | |
return response; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment