2013-04-11 21:30
浏览 64

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.

图片转代码服务由CSDN问答提供 功能建议

我正在尝试将PayPal付款整合到我的Phonegap应用中。 我无法看到跨平台的方式。

我只能看到操作系统特定的插件,我无法在Phonegap构建中使用。 有没有办法使用儿童浏览器整合它? 另外,我没能找到Blackberry的插件。


  • 写回答
  • 好问题 提建议
  • 关注问题
  • 收藏
  • 邀请回答

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.


    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.

    解决 无用
    打赏 举报

相关推荐 更多相似问题