dongzhabo2796 2013-04-02 21:54
浏览 36

Paypal集成,查询

I have a question.

I'm using this Paypal code: http://www.saaraan.com/2012/07/paypal-expresscheckout-with-php I would like to have a premium function on my website, where an user can buy something and the premium featuren should directly be active on his account. How can I enable this? Where should I put the Query to update his account? I mean, what if the paymentstatus is pending, then I don't have the money. Does he have the possibility to cancel the order?

Or should I add the query after the GetTransactionDetails. Or is there the possibility that the order is complete, but the query will not be excuted?

Thanks!

  • 写回答

1条回答 默认 最新

  • dscpg80066 2013-04-03 01:26
    关注

    The best solution for your problem would be to create an IPN listener that would receive the transaction details and, if you code it properly, update your user's account accordingly. You could have it programmed to only update the account if the IPN shows that the paymentstatus is complete, if you want to. I have an IPN listener that has about 8 different scenarios depending on the transaction type and payment status.

    Do a little research on IPN listeners and you'll see that you can really use them to handle a lot of the tedious details for you. Paypal's developer site has IPN listener code examples that can help get you started.

    Hope this helps.

    评论

报告相同问题?

悬赏问题

  • ¥15 关于smbclient 库的使用
  • ¥15 微信小程序协议怎么写
  • ¥15 c语言怎么用printf(“\b \b”)与getch()实现黑框里写入与删除?
  • ¥20 怎么用dlib库的算法识别小麦病虫害
  • ¥15 华为ensp模拟器中S5700交换机在配置过程中老是反复重启
  • ¥15 java写代码遇到问题,求帮助
  • ¥15 uniapp uview http 如何实现统一的请求异常信息提示?
  • ¥15 有了解d3和topogram.js库的吗?有偿请教
  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画