dqh1992 2013-04-11 21:30
浏览 65
已采纳

phonegap / cordova PayPal集成

I'm trying to integrate PayPal payments within my Phonegap app. I can't see a cross platform way to do it.

I can only see OS specific plugins which I can't use in Phonegap build. Is there a way of integrating it using the childbrowser? Also, I failed to find a plugin for Blackberry.

Note: I use Phonegap build, so I prefer a plugin-less solution.

  • 写回答

1条回答 默认 最新

  • doob0526 2013-04-15 08:42
    关注

    what you can do is the in app browser to connect to a php driven page online and there do your paypal stuff.

    http://docs.phonegap.com/en/2.3.0/cordova_inappbrowser_inappbrowser.md.html

    function onDeviceReady() {
         var ref = window.open('http://apache.org', '_blank', 'location=yes');
         ref.addEventListener('loadstart', function() { alert('start: ' + event.url); });
         ref.addEventListener('loadstop', function() { alert('stop: ' + event.url); });
         ref.addEventListener('exit', function() { alert(event.type); });
    }
    

    Remember to white list the url that you will be using within phonegap else you will not to be able to make a connection.

    On the php side write your own restfull api to handle the processing of the payments try to minimize the data sent to and from the api also try to use a secure connection if possible.

    paypal examples can be found here: https://www.x.com/developers/paypal/documentation-tools/paypal-code-samples

    its a solution but i do advise to use plugins for every platform, with those you can better guarantee safety, less bugs and less development time.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 脱敏项目合作,ner需求合作
  • ¥30 Matlab打开默认名称带有/的光谱数据
  • ¥50 easyExcel模板 动态单元格合并列
  • ¥15 res.rows如何取值使用
  • ¥15 在odoo17开发环境中,怎么实现库存管理系统,或独立模块设计与AGV小车对接?开发方面应如何设计和开发?请详细解释MES或WMS在与AGV小车对接时需完成的设计和开发
  • ¥15 CSP算法实现EEG特征提取,哪一步错了?
  • ¥15 游戏盾如何溯源服务器真实ip?需要30个字。后面的字是凑数的
  • ¥15 vue3前端取消收藏的不会引用collectId
  • ¥15 delphi7 HMAC_SHA256方式加密
  • ¥15 关于#qt#的问题:我想实现qcustomplot完成坐标轴