title: How to post value to a controller function without csrf token for paytm callback response?
body: <p>I'm using Paytm payment gateway in my Codeigniter project, I'm sending parameters according to Paytm and everything works fine but after make payment when Paytm redirect back to my callback URL (which is a function in my home controller) with response I'm getting "The action you have requested is not allowed." error. I also tried to send a parameter of csrf token to paytm but they refuesd it. </p>
  
  <p>Please help me how can i get that paytm response. </p>
  
  <pre><code>    {
       header("Pragma: no-cache");
       header("Cache-Control: no-cache");
       header("Expires: 0");
  
       // following files need to be included
       require_once(APPPATH . "/libraries/config_paytm.php");
       require_once(APPPATH . "/libraries/encdec_paytm.php");
  
       $checkSum = "";
       $paramList = array();
  
       $ORDER_ID = time().mt_rand().$this-&gt;session-&gt;userdata('inf_ses_id'); 
       $CUST_ID = $this-&gt;session-&gt;userdata('inf_ses_id')."_thebell"; 
       $INDUSTRY_TYPE_ID = "Retail"; //$_POST["INDUSTRY_TYPE_ID"];
       $CHANNEL_ID = "WEB"; //$_POST["CHANNEL_ID"];
       $TXN_AMOUNT = $this-&gt;session-&gt;userdata('plan_price'); 
  
      // Create an array having all required parameters for creating checksum.
       $paramList["MID"] = PAYTM_MERCHANT_MID;
       $paramList["ORDER_ID"] = $ORDER_ID;
       $paramList["CUST_ID"] = $CUST_ID;
       $paramList["INDUSTRY_TYPE_ID"] = $INDUSTRY_TYPE_ID;
       $paramList["CHANNEL_ID"] = $CHANNEL_ID;
       $paramList["TXN_AMOUNT"] = $TXN_AMOUNT;
       $paramList["WEBSITE"] = PAYTM_MERCHANT_WEBSITE;
       $paramList["CALLBACK_URL"] = "http://localhost/my_project/home/paytm_response";
  
      //Here checksum string will return by getChecksumFromArray() function.
       $checkSum = getChecksumFromArray($paramList,PAYTM_MERCHANT_KEY);
       echo "&lt;html&gt;
      &lt;head&gt;
      &lt;title&gt;Merchant Check Out Page&lt;/title&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;center&gt;&lt;h1&gt;Please do not refresh this page...&lt;/h1&gt;&lt;/center&gt;
              &lt;form method='post' action='".PAYTM_TXN_URL."' name='f1'&gt;
      &lt;table border='1'&gt;
       &lt;tbody&gt;";
  
       foreach($paramList as $name =&gt; $value) {
       echo '&lt;input type="hidden" name="' . $name .'" value="' . $value .         '"&gt;';
       }
  
       echo "&lt;input type='hidden' name='CHECKSUMHASH' value='". $checkSum . "'&gt;
  
       &lt;/tbody&gt;
      &lt;/table&gt;
      &lt;script type='text/javascript'&gt;
      document.f1.submit();
      &lt;/script&gt;
      &lt;/form&gt;
      &lt;/body&gt;
      &lt;/html&gt;";
       } 
  </code></pre>
  
  <p>Here is my callback function in the same controller</p>
  
  <pre><code>public function paytm_response(){
          var_dump($_POST); }
  </code></pre>
  
  <p>An Error Was Encountered
  The action you have requested is not allowed.</p>