title: ccavenue integration in ionic android with php
body: <p>Iframe solution is not working for https links.</p>
  
  <p>Need to use RSA key encryption method provided by ccavenue mobile integration KIT.</p>
  
  <p>Use the non-seamless mobile kit integration of php.</p>
  
  <p>Add inappbrowser in application to visualize the ccavenue response.</p>
  
  <pre><code>$ cordova plugin add cordova-plugin-inappbrowser
  </code></pre>
  
  <p>After successful installation write the following code in the controller -</p>
  
  <pre><code>$scope.data = {
      orderId: 1,
      amount: 1,
  };
  
  $scope.ref = null;
  $scope.getStateSecondWindow = function() 
  {
      $scope.ref.executeScript(
          {code: "localStorage.getItem('isCloseSelf')"},
          function(data)
          {
              if (data == 'yes')
              {
                  $scope.ref.close();
              } 
          }
      );
  }
  $scope.onSubmit = function(){
      $scope.ref = window.open(CONFIG.BASE_URL + 'getRSA.php?orderId=' +     $scope.data.orderId + '&amp;amount=' + $scope.data.amount,'_blank','location=no');
      $scope.ref.addEventListener('loadstart', function(event) {  });
      $scope.ref.addEventListener('loadstop', function(event) {
      setInterval($scope.getStateSecondWindow, 5000);
      });
      $scope.ref.addEventListener('exit', function(event) {  });
  }
  </code></pre>
  
  <p>Refer the link for php code: <a href="https://github.com/manjitlatthe/ionic-php-ccavenue-integration" rel="nofollow noreferrer">https://github.com/manjitlatthe/ionic-php-ccavenue-integration</a></p>