title: Make return URL for getting a response from bank/paymentgateway
body: <p>I need to create a return url which I have given to a payment gateway in which they will post their response parameters:</p>
  
  <pre><code>status
  customerReferenceNo    
  referenceNo
  merchantId
  amount
  checkSum
  </code></pre>
  
  <p>to the URL I given. All I want is an HTML page which could accept this parameters and store them to a database, the database part I can do it.</p>
  
  <p>But the php code for accepting their values,I cant do that.i dont know whether they are using POST or GET:</p>
  
  <pre><code>status-4N
  customerReferenceNo    -  30An
  referenceNo  - 32 AN
  merchantId  - 10AN
  amount  - 9.2AN
  checkSum - 64AN
  </code></pre>
  
  <p>This are the parameters they given in their documentation and they have also given respective field specification (I don't know what field specs is).</p>
  
  <p>The status '0' will be successful transaction and if its a negative value, it's a failed transaction.</p>
  
  <pre><code> &lt;?php
      require("./connect.php");
  
      if (count($_GET)==0 &amp;&amp; count($_POST)==0)
      {  
      ?&gt; 
           &lt;h1 style="font-weight:bold; font-family:'RobotoThin' align='center';"&gt;ERROR. NO DATA FOUND&lt;/h1&gt;
      &lt;?php
      }
      else
      {
  
          if($_SERVER['REQUEST_METHOD']=='POST')
          {
  
           $status    = $_REQUEST['Status'];
           $essrefno= $_REQUEST['TransactionId'];
           $ref_no= $_REQUEST['ReferenceNo']; 
  
           $sql = "update `tablename` set `ess_ref_no`= '$essrefno',status='$status' where ref_no ='$ref_no'";
  
           mysql_query($sql);
           }
           if($_SERVER['REQUEST_METHOD']=='GET')
          {
  
           $status    = $_REQUEST['Status'];
           $essrefno= $_REQUEST['TransactionId'];
           $ref_no= $_REQUEST['ReferenceNo'];
  
            //echo $status+$essrefno+$ref_no;
           $sql = "update `tablename` set `ess_ref_no`= '$essrefno',status='$status' where ref_no ='$ref_no'";
  
           mysql_query($sql);
           }
          //echo $sql;
      ?&gt;
      &lt;?php
          if ($status==0 )
          {
      ?&gt;
              &lt;h1 style="font-weight:normal; font-family:'RobotoThin';"&gt;Your transaction is successful and your transaction reference no for any further communication is  &lt;?php echo $ref_no; ?&gt; .&lt;/h1&gt;
       &lt;?php
          }
          else
          {
       ?&gt;
              &lt;h1 style="font-weight:normal; font-family:'RobotoThin';"&gt;Your transaction failed and your transaction reference no for any further communication is  &lt;?php echo $ref_no; ?&gt;.&lt;/h1&gt;
       &lt;?php
          } 
      }
  ?&gt;
  </code></pre>
  
  <p>This is the PHP I have made but it's not working. Moreover I have given something.html page to them and I don't know how this PHP be integrated to that HTML page using JavaScript or something? Is there someone who could help me?</p>