Search code examples
c#.netasp.net-mvcpaytm

PayTM gateway coming back to Callback URL without asking for payment


I am implementing PayTM Gateway on my ASP.NET MVC website. But it is not asking for payment instead after going to PayTM it redirects back to call back URL automatically. This is the code generated by the controller:

<!DOCTYPE html>
<html>
   <head>
      <title>Merchant Checkout Page</title>
   </head>
   <body>
      <center>
         <h1>Please do not refresh this page...</h1>
      </center>
      <form method='post' action='https://securegw.paytm.in/theia/processTransaction' name='f1'>
         <input type='hidden' name='MID' value='<MID>'>
         <input type='hidden' name='CHANNEL_ID' value='WEB'>
         <input type='hidden' name='WEBSITE' value='<WEBSITE>'>
         <input type='hidden' name='CALLBACK_URL' value='<callback>'>
         <input type='hidden' name='CUST_ID' value='1'>
         <input type='hidden' name='MOBILE_NO' value='7777777777'>
         <input type='hidden' name='EMAIL' value='[email protected]'>
         <input type='hidden' name='ORDER_ID' value='31'>
         <input type='hidden' name='INDUSTRY_TYPE_ID' value='Retail'>
         <input type='hidden' name='TXN_AMOUNT' value='300.01'>
         <input type='hidden' name='CHECKSUMHASH' value='<checksum>'>
         <script type='text/javascript'>document.f1.submit();</script>
      </form>
   </body>
</html>

Solution

  • Solved it. Redirecting to the wrong view in the action. And when redirected to the correct view it showed duplicate order id and invalid transaction amount. Corrected it and it worked. Hope this helps someone in the future.