doutao5419 2013-12-02 18:50
浏览 73
已采纳

用paypal api支付没有重定向

So I have a paypal shop set up, im using the rest php api. for credit card transactions, the api allows me to make my own form on my site, but if paying with a paypal account, part of the api call redirects a user to the paypal.com site to log in. I understand that for security reasons, paypal doesn't want the user giving their username/password to my site. However, i do not want the user to be redirected away from my site. is there a way to make that auto redirect in a new window, instead of the current window being changed? Ideally, the flow would be pop paypal.com window, complete payment, close window, and now back on my original page. is this possible?

  • 写回答

1条回答 默认 最新

  • doucan8246326 2013-12-02 19:10
    关注

    PayPal has a feature that does exactly that. It is called DigitalGoods. Unfortunately, it is still not available with their REST API.

    If you examine their REST API then you'll notice that you are handing over the control of workflow to PayPal and you don't get to open or close windows.

    So, no. You cannot do what you are trying to do with the REST API.

    After banging my head several times on my desk I gave up on their latest and greatest REST API and went back to their DigitalGoods API. My suggestion is you do the same and save yourself the agony I went through.

    BTW, I recommend using a library such as this one. This way you don't have to learn the innards of the Digital Goods API in order to use it.

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

报告相同问题?

悬赏问题

  • ¥15 drone 推送镜像时候 purge: true 推送完毕后没有删除对应的镜像,手动拷贝到服务器执行结果正确在样才能让指令自动执行成功删除对应镜像,如何解决?
  • ¥15 求daily translation(DT)偏差订正方法的代码
  • ¥15 js调用html页面需要隐藏某个按钮
  • ¥15 ads仿真结果在圆图上是怎么读数的
  • ¥20 Cotex M3的调试和程序执行方式是什么样的?
  • ¥20 java项目连接sqlserver时报ssl相关错误
  • ¥15 一道python难题3
  • ¥15 牛顿斯科特系数表表示
  • ¥15 arduino 步进电机
  • ¥20 程序进入HardFault_Handler