String merchantMid = "**removed**"; String merchantKey = "**removed**"; Dictionary<string, string> parameters = new Dictionary<string, string>(); parameters.Add("MID", merchantMid); parameters.Add("CHANNEL_ID", "WEB"); parameters.Add("INDUSTRY_TYPE_ID", "Retail"); parameters.Add("WEBSITE", "WEB_STAGING"); parameters.Add("EMAIL", "**removed**"); parameters.Add("MOBILE_NO", "7777777777"); parameters.Add("CUST_ID", "CUST_BIB"); parameters.Add("ORDER_ID", "XXLALALAYY"); parameters.Add("TXN_AMOUNT", "10.00"); parameters.Add("CALLBACK_URL", "http://**removed**"); //This parameter is not mandatory. Use this to pass the callback url dynamically. string checksum_S =CheckSum.generateCheckSum(merchantKey, parameters); string paytmURL = "https://securegw-stage.paytm.in/theia/processTransaction?orderid="+parameters.FirstOrDefault(x => x.Key == "ORDER_ID").Value; string outputHTML = "<html>"; outputHTML += "<head>"; outputHTML += "<title>Merchant Check Out Page</title>"; outputHTML += "</head>"; outputHTML += "<body>"; outputHTML += "<center><h1>Please do not refresh this page...</h1></center>"; outputHTML += "<form method='post' action='" + paytmURL + "' name='f1'>"; outputHTML += "<table border='1'>"; outputHTML += "<tbody>"; foreach (string key in parameters.Keys) { outputHTML += "<input type='hidden' name='" + key + "' value='" + parameters[key] + "'>"; } outputHTML += "<input type='hidden' name='CHECKSUMHASH' value='" + checksum_S + "'>"; outputHTML += "</tbody>"; outputHTML += "</table>"; outputHTML += "<script type='text/javascript'>"; outputHTML += "document.f1.submit();"; outputHTML += "</script>"; outputHTML += "</form>"; outputHTML += "</body>"; outputHTML += "</html>"; Response.Write(outputHTML);
parameters.FirstOrDefault(x => x.Key == "ORDER_ID").Value
parameters["ORDER_ID"]
KeyNotFoundException
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)