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条)

报告相同问题?

悬赏问题

  • ¥15 wegame打不开英雄联盟
  • ¥15 公司的电脑,win10系统自带远程协助,访问家里个人电脑,提示出现内部错误,各种常规的设置都已经尝试,感觉公司对此功能进行了限制(我们是集团公司)
  • ¥15 救!ENVI5.6深度学习初始化模型报错怎么办?
  • ¥30 eclipse开启服务后,网页无法打开
  • ¥30 雷达辐射源信号参考模型
  • ¥15 html+css+js如何实现这样子的效果?
  • ¥15 STM32单片机自主设计
  • ¥15 如何在node.js中或者java中给wav格式的音频编码成sil格式呢
  • ¥15 不小心不正规的开发公司导致不给我们y码,
  • ¥15 我的代码无法在vc++中运行呀,错误很多