dousao6260 2015-08-10 15:14 采纳率: 0%
浏览 10
已采纳

PayPal IPN的PHP类[关闭]

I don't know where else to turn...

I have a client who insists on using PayPal as their credit card merchant. We will be taking cards directly on the site, so I suppose "Website Payments Pro" is the right avenue?

All of these different PayPal types, API's, accounts, etc. are all very confusing to me- I'm used to working with Stripe which is, in my opinion, the best, cleanest solution I have ever found.

Anyway, I have been looking everywhere for some sort of a PHP class to help me interact with the PayPal API as I have all but given up on figuring out how to interact with this thing from scratch. All of the classes I've found are several years old and no longer seem to function properly.

Does anyone have any suggestions? Any help would be extremely appreciated!

  • 写回答

2条回答 默认 最新

  • duanjian3920 2015-08-10 22:27
    关注

    This PayPal PHP Class Library will make all of the PayPal Classic API calls very simple for you, including Payments Pro. It has fully functional samples included with it, and then "templates" that are empty and ready for you to simply fill in your param values. It handles the rest.

    You can see a sample of the output for DoDirectPayment here, which is the API that is used for Website Payments Pro 3.0 that you mentioned. Note that it's working in the sandbox, and PayPal's sandbox is a little slow processing credit cards, so that sample might take a few moments to load, but the live servers don't do that.

    You do need to make sure "Website Payments Pro" is what your client has enabled on their PayPal account if you're going to use DoDirectPayment, though. PayPal has a new version where they dropped the "website" and they just call it "PayPal Payments Pro 2.0". Yes, 2.0 is newer than 3.0. There's a reason for that, and if you're curious you can read about the history of PayPal Pro here.

    If the client has the newer PayPal Payments Pro 2.0 enabled then you'll need to use the PayFlow API instead of DoDirectPayment. The class library includes that as well, and you can see a sample of its result here.

    Using the library you could get credit card processing up-and-running within minutes.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料