我如何与 PayPal IPN 进行适当交互以实现序列生成?
PayPal IPN 遇到一些问题。我已经看到这些问题的变体被列出了大约一百万次,但没有找到我正在寻找的答案。像往常一样,这可能是一个关于错误问题的问题,但我希望有一些超级天才可以提供帮助。
不管怎样,我基本上需要购买一些现成的软件,并且一旦交易完成,就向他们发送序列号。人们可能会认为这很简单,但考虑到标准,事实证明事实并非如此。基本上步骤如下:
1) 网站上的自定义表格输入个人(但不要太 =P)信息
2) 将其转发到 PayPal 网站进行购买
3) 交易成功后自动将其发送至序列号页面和/或发送注册电子邮件。
我查看了各种 IPN 类(顺便说一句,使用 PHP),没有什么看起来非常简单,而且 PayPal 似乎不喜欢传递任何类型的自定义变量,也不会在购买后自动将某人发送到其他地方。另外,如果/当进程最终恢复时我应该查看哪个 ID?
也许我需要“Pro”帐户?无论如何,请不要对我对 PayPal IPN 的了解做出任何假设。我只是想要一门课程(希望是我还没有尝试过的课程)或至少一些关于如何实现这一目标的更直接(和简洁)的文档。
最好的。
编辑#1:
有人有关于在购买期间启用数量字段的任何信息吗?由于某种原因,它停留在 1 并且不允许更改。我不会为了数量atm而传递任何东西。
Having a bit of trouble with the PayPal IPN. I've seen variations on these questions listed about a million times, but not the answers I'm looking for. As usual this may be a case of asking a question regarding the wrong thing, but I'm hoping there are some super geniuses out there that can assist.
Anyway, I basically need to set up the purchase of some readily available software, and, once the transaction is complete send them a serial. One would think this is simple, but given the criteria it has proven anything but. Basically the steps are as follows:
1) Custom form on website to enter personal (but not too =P) info
2) Forward them to PayPal site to make purchase
3) Upon successful transaction AUTOMATICALLY send them to a serial page and/or send an email with the registration.
I've looked at various IPN classes (using PHP btw) and nothing seems very straightforward, and it doesn't seem that PayPal likes any kind of custom variables being passed, nor does it seem to automatically send someone elsewhere after the purchase. Also, which ID should I be looking at if/when the process finally does come back around?
Perhaps I need the "Pro" account? In any event, please make no assumptions regarding my knowledge of PayPal IPN. I'd simply like a class (hopefully one I haven't tried already) or at least some more straightforward (and concise) documentation on how to accomplish this.
Best.
EDIT #1:
Does anyone have any information on enabling the QUANTITY field during a purchase? For some reason it's stuck at 1 and will not allow a change. I'm not passing anything for quantity atm.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Paypal API 因用户界面不太友好而闻名。也就是说,我已经成功使用了 IPN API,但是,我不确定这是否是您想要在您的案例中使用的。 IPN(即时付款通知)为 1.) 用于向您的服务器发送通知。 2.) 它与您的服务器通信,因此不会对客户的交易产生任何影响。 3.) 并不总是即时的。
因此,如果您想在购买后将客户发送到某个页面,您将无法通过 IPN 来完成此操作。您可以首先查看Express Checkout API。
如果您只需要一个简单的重定向,Paypal 提供了一种方法来做到这一点。
您可以在服务器上设置一个与 IPN 集成的 PHP 文件。该文件的工作方式如下:
The Paypal API's are kinda known for not being super user-friendly. That said, I have successfully used the IPN API, however, I'm not sure this is what you want to use in your case. IPN (Instant Payment Notification) is 1.) For sending notifications to your server. 2.) It communicates with your server and therefore does not have any effect on a customer's transaction. 3.) Not instant all the time.
So, if you want to send a customer to a certain page, after purchase, you will not be able to accomplish this with IPN. You could start by looking at the Express Checkout API.
If you just need a simple redirect, Paypal provides a way to do this.
You could setup a PHP file on your server, which integrates with IPN. This file would work like this:
我建议您使用ezimerchant -> www.ezimerchant.com
免费注册。他们有一个优秀的 API,可以让你做到这一切,他们直接与 paypal 连接,所以你不必费心学习他们复杂的 api。
首先,您需要使用 OrderCreate API,注册后您可以访问此处的文档:
https://api.ezimerchant.com/
[merchantid]/orders/edit 不要忘记添加您的商家 ID 。
那么就像提供“RETURNURL”和 NOTIFYURL 一样简单。通知 url 是一个 PHP 脚本,它接受带有订单详细信息的 ping 返回,您只需检查付款是否成功并通过电子邮件发送序列号。
我有一些关于这些东西的 php 代码,所以如果你走这条路,请告诉我。
I suggest that you use ezimerchant -> www.ezimerchant.com
It's free to sign up. They have an excellent API that allows you to do all that, they hook straight in with paypal so you dont have to bother learning their complex api.
To get you started, you'd use the OrderCreate API, once you signed up you can access the documentation here:
https://api.ezimerchant.com/[merchantid]/orders/edit
Don't forget to add your merchant id.
then it's as simple as supplying a "RETURNURL" and a NOTIFYURL. The Notify url is a php script that accepts a ping back with the order details, you just check if payment was successful and email out the serial code.
I have some code in php for this stuff so let me know if you go down this path.