Paypal Payflow 专业库
我已经在我的 Codeigniter 应用程序中集成了快速结帐功能。现在我想集成无缝贝宝,我收集 CC 信息并将其传递给贝宝(通过后端),一旦一切都获得批准,我的应用程序就会向用户显示这一点。所有这一切都无需访问 Paypal 网站。
我知道 Paypal 提供了一堆示例代码,但他们有很多不同的产品在广告中做同样的事情。
PHP 中是否有任何包装库可以用来处理所有这些?
迁移到这样的系统涉及什么样的设计决策?我需要 SSL 证书吗?
I already have an express checkout integrated with my Codeigniter application. Now I want to integrate seamless paypal where I collect the CC information and pass it to Paypal (via backend) and once everything is approved, my application shows that to the user. All this with out ever going to Paypal's website.
I know that Paypal gives a bunch of sample code but they have so many different products that advertise to do the same thing.
Is there any wrapper library in PHP that I can use for handling all this?
What sort of design decision is involved in migrating to such system? Would I need SSL certificates for this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我在 CodeIgniter 中构建了一个电子商务网站,还进行了无缝 Paypal 集成。
当我进行狩猎时,似乎没有任何非常漂亮的面向对象的包装器,但我确实注意到了一些好的尝试。
我的解决方案最终有点平淡。我从这里下载了 PHP API:
https://cms.paypal.com/cms_content/US/ en_US/files/developer/PP_PHP_NVP_Samples.zip
我将
CallerService.php
文件保存为application/helpers/paypal_helper.php
并将其添加到application /config/autoload.php
将其拉入应用程序。现在,
CallerService.php
需要constants.php
,因此您需要将其复制并粘贴到其中,或者将constants.php
文件包含在你的助手目录。我只是复制并粘贴。然后,请确保为您的帐户配置所有常量。设置完成后,我的代码看起来像这样:
它不太优雅,但绝对运行良好。
另外,您绝对需要 SSL 证书。单个域名的购买价格约为 30 美元。一开始设置它们有点困难,但是您不能跳过这一步。 SSL 保护客户的计算机和您的服务器之间的传输,因此他们的 CC 信息在经过所有服务器和路由器(或通过 WiFi 嗅探)时无法被读取。因此,只需确保在用于获取 CC 信息的表单上,表单提交到 https:// 而不是不安全的 http://。
I built an e-commerce site in CodeIgniter, also doing seamless Paypal integration.
There didn't seem to be any suuuuuper-pretty object-oriented wrappers out there when I did my hunting, but I did notice some good attempts.
My solution ended up being a bit bland. I downloaded the PHP API from here:
https://cms.paypal.com/cms_content/US/en_US/files/developer/PP_PHP_NVP_Samples.zip
I saved the
CallerService.php
file asapplication/helpers/paypal_helper.php
and added it toapplication/config/autoload.php
to pull it into the app.Now,
CallerService.php
requiresconstants.php
, so you either need to copy and paste it in, or include theconstants.php
file in your helpers directory. I just copied and pasted. Then, be sure to configure all the constants for your account.Once that's set up, my code just looked like this:
It's not too elegant, but it definitely works well.
Also, you DEFINITELY need an SSL certificate. These can be purchased for $30 or so for a single domain. They are a little difficult to set up at first, but you can't skip this step. SSL protects transmission between the customer's computer and your server, so their CC info can't be read as it passes through all the servers and routers (or sniffed out through wifi) along the way. So, just make sure that, on the form you use to take CC info, the form submits to https:// and not an unsecured http://.
我非常确定,无论您的网站如何获取敏感数据(即信用卡号),那么您都需要 ssl 证书。除非它们位于其他人的服务器 (paypal.com) 上,否则您需要注意这一点。而且,正如您所说,您不想将它们发送到 paypal.com,所以是的,您需要一个。
另外,如果您已经集成了快速结账,那么无论如何您都应该使用 ssl 证书,对吗?
I'm pretty sure that no matter what if your website is taking sensitive data (i.e. credit card number), then you need an ssl certificate. Unless they are on someone else's server (paypal.com), you need to take care of that. And, like you said, you don't want to send them to paypal.com, so yeah, you'll need one.
Also, if you already have express checkout integrated, you should be using an ssl certificate for that anyway, right?