【问题标题】:Integration of ccavenue payment gateway in ionic android mobile app在 ionic android 移动应用程序中集成 ccavenue 支付网关
【发布时间】:2016-07-20 05:13:21
【问题描述】:

我需要在 ionic android 应用中实现 ccavenue 支付网关的集成步骤。请帮帮我。

【问题讨论】:

    标签: android ionic-framework ccavenue


    【解决方案1】:

    Iframe 解决方案不适用于 https 链接。

    需要使用ccavenue mobile integration KIT提供的RSA密钥加密方式。

    使用 php 的非无缝移动套件集成。

    在应用程序中添加 inappbrowser 以可视化 ccavenue 响应。

    $ cordova plugin add cordova-plugin-inappbrowser
    

    安装成功后在控制器中写入如下代码-

    $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 + '&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) {  });
    }
    

    php代码参考链接:https://github.com/manjitlatthe/ionic-php-ccavenue-integration

    【讨论】:

      猜你喜欢
      • 2017-12-19
      • 2015-12-21
      • 2014-07-07
      • 2013-05-03
      • 2017-09-23
      • 1970-01-01
      • 2019-08-04
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多