title: Loading payment gateway page in codeigniter
body: <p>I have a payment gateway which I want to integrate with codeigniter. I am getting values from view using ajax. I need to redirect to the payment gateway page with some values so that the user can do the further process in the payment gateway page.</p>
  
  <p>My view which passes the values</p>
  
  <pre><code>&lt;script&gt;
      $(document).ready(function(){
      $(".loader").hide();
      $("#connectionForm").on('submit', function(e){
          e.preventDefault();
          var data = new FormData(this);
          $.ajax({
              url: "&lt;?php echo base_url('index.php/home/save_new_connection');?&gt;",
              type: "POST",
              dataType:'json',
              // async:false,
              data:  new FormData(this),
              contentType: false,
              cache: true,
              processData:false,
  
              success: function(data)
              {   
  
              }
          });
      });
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>Here is my controller which process the values</p>
  
  <pre><code>public function save_new_connection()
  {
      $data['name']=$name=$this-&gt;input-&gt;post('name');
      $data['amount']=$amount=$this-&gt;input-&gt;post('amount');
      $url='https://abcd.com/servlet';
      include APPPATH . 'class/NetworkonlieBitmapPaymentIntegration.php';
      $networkOnlineArray['Field_Existence_Indicator_Transaction']['amount']=$amount;
      $networkOnlineArray['Field_Existence_Indicator_Billing']['billToFirstName']=$name;
      $networkOnlineObject=new NetworkonlieBitmapPaymentIntegration($networkOnlineArray);
      $data['requestParameter']=$requestParameter;
      redirect("https://abcd.com/servlet".$requestParameter);
  </code></pre>
  
  <p>I need to send the $requestParameter to the $url so that the payment gateway page will be shown to the user, I used curl as an option but it's not redirecting to the payment gateway page. I tried to pass the values back to ajax, but the "echo" which place after <code>include APPPATH. 'class/NetworkonlieBitmapPaymentIntegration.php';</code> is not working. How can I achieve this?</p>