vishnu vishnu

vishnu vishnu

  • NA
  • 287
  • 8.4k

paytm .please help..i got below page while intigrate paytm

Jan 11 2019 4:38 AM
  1. protected void Page_Load(object sender, EventArgs e)  
  2. {  
  3. String merchantKey = "o@w1qIz8qqUh0Bdg";  
  4. Dictionary<stringstring> parameters = new Dictionary<stringstring>();  
  5. parameters.Add("MID""SsCkKW41335934713275");  
  6. parameters.Add("CHANNEL_ID""WEB");  
  7. parameters.Add("INDUSTRY_TYPE_ID""Retail");  
  8. parameters.Add("WEBSITE""WEB_STAGING");  
  9. parameters.Add("EMAIL""[email protected]");  
  10. parameters.Add("MOBILE_NO""8500414141");  
  11. parameters.Add("CUST_ID""2");  
  12. parameters.Add("ORDER_ID""1");  
  13. parameters.Add("TXN_AMOUNT""20");  
  14. // parameters.Add("CALLBACK_URL", "url"); //This parameter is not mandatory. Use this to pass the callback url dynamically.  
  15. string checksum = CheckSum.generateCheckSum(merchantKey, parameters);  
  16. string paytmURL = "https://securegw-stage.paytm.in/theia/processTransaction?orderid=" + "6";  
  17. string outputHTML = "<html>";  
  18. outputHTML += "<head>";  
  19. outputHTML += "<title>Merchant Check Out Page</title>";  
  20. outputHTML += "</head>";  
  21. outputHTML += "<body>";  
  22. outputHTML += "<center><h1>Please do not refresh this page...</h1></center>";  
  23. outputHTML += "<form method='post' action='" + paytmURL + "' name='f1'>";  
  24. outputHTML += "<table border='1'>";  
  25. outputHTML += "<tbody>";  
  26. foreach (string key in parameters.Keys)  
  27. {  
  28. outputHTML += "<input type='hidden' name='" + key + "' value='" + parameters[key] + "'>";  
  29. }  
  30. outputHTML += "<input type='hidden' name='CHECKSUMHASH' value='" + checksum + "'>";  
  31. outputHTML += "</tbody>";  
  32. outputHTML += "</table>";  
  33. outputHTML += "<script type='text/javascript'>";  
  34. outputHTML += "document.f1.submit();";  
  35. outputHTML += "</script>";  
  36. outputHTML += "</form>";  
  37. outputHTML += "</body>";  
  38. outputHTML += "</html>";  
  39. Response.Write(outputHTML);  
  40. }  

Answers (1)