dongxuan8227 2010-12-14 02:22
浏览 56
已采纳

为了生成序列,我如何与PayPal IPN进行适当的交互?

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.

  • 写回答

2条回答 默认 最新

  • doutang1884 2010-12-14 02:33
    关注

    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:

    1. IPN sends a "transaction completed" notification to your PHP file.
    2. Your PHP file reads the notification to ensure that it's a "completed transaction notification", as opposed to another notification (such as "transaction failed", etc).
    3. If everything is ok, your PHP file can generate and email out whatever you need to the customer.
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 2020长安杯与连接网探
  • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么
  • ¥15 banner广告展示设置多少时间不怎么会消耗用户价值
  • ¥16 mybatis的代理对象无法通过@Autowired装填
  • ¥15 可见光定位matlab仿真
  • ¥15 arduino 四自由度机械臂
  • ¥15 wordpress 产品图片 GIF 没法显示
  • ¥15 求三国群英传pl国战时间的修改方法
  • ¥15 matlab代码代写,需写出详细代码,代价私
  • ¥15 ROS系统搭建请教(跨境电商用途)