title: redirecting to merchant's web page from CC Avenue website. PHP
body: <p>I have done a payment gateway project and it works perfectly. Payment is properly debited from the user account and credited to company's account. But it is not redirecting to the page in merchant's website which is mentioned in a file ccavResponseHandler.php. Instead it redirects to the home page of the merchant's website. I would like to redirect it to success.php and from the same page I will compose order details from the database and send mail to the client and the company. Here is the code from CC Avenue. I have removed few confidential details from this, but the same is there in my file.</p>
  
  <pre><code> &lt;?php include('Crypto.php')?&gt;    
      &lt;?php    
      error_reporting(0);    
      $workingKey='';     
      $encResponse=$_POST[""];
      $rcvdString=decrypt($encResponse,$workingKey);  
      $order_status="";
      $decryptValues=explode('&amp;', $rcvdString);
      $dataSize=sizeof($decryptValues);
  
      for($i = 0; $i &lt; $dataSize; $i++) 
      {
          $information=explode('=',$decryptValues[$i]);
          if($i==3)   $order_status=$information[1];
      }
  
      if($order_status==="Success")
      {
          header('Location:success.php');             
      }
      else if($order_status==="Aborted")
      {   
          header('Location:abort.php');   
      }
      else if($order_status==="Failure")
      {
          header('Location:failure.php');     
      }
      else
      {
          echo "&lt;br&gt;Security Error. Illegal access detected";    
      }    
      echo "&lt;br&gt;&lt;br&gt;";    
      echo "&lt;table cellspacing=4 cellpadding=4&gt;";
      for($i = 0; $i &lt; $dataSize; $i++) 
      {
          $information=explode('=',$decryptValues[$i]);
          echo '&lt;tr&gt;&lt;td&gt;'.$information[0].'&lt;/td&gt;&lt;td&gt;'.urldecode($information[1]).'&lt;/td&gt;&lt;/tr&gt;';
      }    
      echo "&lt;/table&gt;&lt;br&gt;";    
      ?&gt;
  </code></pre>
  
  <p>Here is the landing page</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;/head&gt;
      &lt;?php
      echo "Thank you for shopping with us. Your credit card has been charged and your transaction is successful. We will be shipping your order to you soon";
      ?&gt;
  </code></pre>