带有 CodeIgniter 的 PayPal IPN
我正在尝试在 CodeIgniter 构建的网站上实现会员订阅服务。我希望使用 PayPal 来管理付款,但实现这一点非常困难。
我想要实现的是:
- 用户填写会员表格 个人详细信息
- 用户选择 订阅选项(8 种选择中的 1 种 - 每种价格不同)并提交表格
- 用户被发送到 PayPal 进行付款
- 用户在成功付款后返回到网站,个人详细信息存储在创建用户帐户(会员资格)的数据库中。
还有附加的表单验证,我在 CodeIgniter 中使用 form_validation 帮助程序,但这需要在 PayPal 付款开始之前完成。
我尝试实现 Ran Aroussi 的 PayPal_Lib,但我觉得它没有足够清晰的文档或指导。任何已实施的示例或建议将不胜感激。
卢卡斯
I am trying to implement a membership subscription service on a website built in CodeIgniter. I wish to use PayPal to manage payments, and am having a very hard time implementing this.
What I am trying to achieve is:
- User fills in a membership form with
personal details - User selects a
subscription option (1 of 8 choices - each different price) and submits form - User is sent to PayPal to pay
- User is returned to site upon successful payment and personal details are stored in database which creates user account (membership).
There is also the addition of form validation, I use the form_validation helper in CodeIgniter, but this needs to be done before PayPal payment can commence.
I have attempted to implement the PayPal_Lib from Ran Aroussi, but I feel it has not enough clear documentation or guidance on it. Any implemented examples or advice would be much appreciated.
Lucas
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我发现 Ran 的库也有点难以使用,所以我编写了一个替代品 - 它还具有对交易执行更多检查的好处,并在数据库中记录 IPN 调用和订单详细信息。这是 GitHub 上的库,希望您觉得它有用:
https://github.com/orderly/ codeigniter-paypal-ipn
I found Ran's library a little hard to use too so I've written a replacement - which also has the benefit of performing more checks on the transaction, and logging the IPN call and the order details in your database. Here's the library on GitHub, I hope you find it useful:
https://github.com/orderly/codeigniter-paypal-ipn
下面是我在 Ran 的库中使用的未修改的代码。
希望有帮助。
Below is the unmodified code that i used with Ran's library.
Hope it helps.
这是 Jamie Rumbelow 提供的一个 paypal 库,我一直在使用它并进行一些小的调整:
http://bitbucket。 org/jamierumbelow/codeigniter-paypal/src
Here's a paypal library from Jamie Rumbelow that I've been using with minor tweaks:
http://bitbucket.org/jamierumbelow/codeigniter-paypal/src