简体   繁体   English

CodeIgniter中的Paypal

[英]Paypal in CodeIgniter

After reading documentation on paypals developers website for quite a while, I've come to stack. 在阅读了关于paypals开发者网站的文档很长一段时间之后,我来到了堆栈。 I'm a bit confused on how the whole API deal works, and I decided to take it simpler, find out if I even need to use anything more complex than buttons. 我对整个API协议的工作方式感到有些困惑,我决定更简单一点,找出是否需要使用比按钮更复杂的东西。 So... 所以...

What I Need: Multiple options for digital goods (IE - 2 Posts for $5, 10 posts for $10) 我需要的:数字商品的多种选择(IE - 2个帖子5美元,10个帖子10美元)

I obviously could use a button to have them pay, but I need to be able to get a response to know which of the 2 (or more in the future) things they bought, so I can modify the database accordingly. 我显然可以使用一个按钮让他们付钱,但我需要能够得到一个回复​​,知道他们购买的2件(或更多)中的哪一件,所以我可以相应地修改数据库。 Is this possible with something like https://www.x.com/community/ppx/wps 这可能与https://www.x.com/community/ppx/wps这样

Or am I going to have to use the API? 或者我将不得不使用API​​? I installed Leon's Barretts' library for paypal in CodeIgniter: http://www.leonbarrett.com/code/paypal/ 我在CodeIgniter中安装了Leon's Barretts的paypal库: http//www.leonbarrett.com/code/paypal/

And I'm just completely unsure where to go from here, ideally I'd like the user to be able to pay with credit card w/oa paypal account, or pay with paypal with a paypal account. 而且我只是完全不确定从哪里开始,理想情况下我希望用户能够使用信用卡付款,无需支付宝贝账户,或使用PayPal账户支付PayPal。

Any thoughts to help me get going? 有什么想法可以帮助我开始吗? Thanks guys! 多谢你们!

Actually, I just went through this. 实际上,我刚刚经历过这个。 One thing you MUST be aware of is that PayPal (PP) is moving their "new clients over to the new "payflowpro" api. I spent a month successfully developing a cart which made use of the older paypalpro nvp api only to find out that since my client was "new" (she had been using PP for years at tradeshows and such) because she wanted to add online purchasing to her web site - she had to use payflowpro ! 你必须要注意的一点是,PayPal(PP)正在将他们的“新客户转移到新的”payflowpro“api。我花了一个月的时间成功开发了一款使用旧版paypalpro nvp api的购物车,但却发现了因为我的客户是“新的”(她多年来一直在使用PP进行贸易展等),因为她想在网上添加在线购买 - 她不得不使用payflowpro

No where in the documentation did PayPal steer me to the new api. 没有在文档中的哪个地方,PayPal引导我到新的api。 I chose the nvp solution because there was more documentation on it out there. 我选择了nvp解决方案,因为那里有更多的文档。 Do yourself a favor and make sure you are developing for the right api! 帮自己一个忙,确保你正在为正确的api开发!

Here is a link to a class that worked for me Angell EYE PayPal CodeIgniter Library 这是一个为我工作的类的链接Angell EYE PayPal CodeIgniter Library

Best of all, Andrew Angell is really helpful! 最重要的是,安德鲁安吉尔真的很有帮助!

This should be a good resource to get you started . 这应该是一个很好的资源,可以帮助您入门 It covers what is required to do payments through paypal, and has some code examples. 它涵盖了通过paypal进行支付所需的内容,并提供了一些代码示例。 You can then apply that information to creating your own library, or using the one you previously installed. 然后,您可以将该信息应用于创建自己的库,或使用先前安装的库。

这是一个内置的paypal库,由Ran Aroussi paypal库为codeigniter提供codeigniter

您还可以结账Paypal IPN库 - https://github.com/orderly/codeigniter-paypal-ipn

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM