PayPal订阅PDT/IPN-请 [英] PayPal subscriptions PDT / IPN - PLEASE

查看:95
本文介绍了PayPal订阅PDT/IPN-请的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

让我难以理解这种贝宝付款的东西...

Am having a lot of trouble getting my head around this paypal payment stuff...

我如何确认用户已成功注册我的订阅?

我对IPN的了解为0,但例如:如果某个用户通过example@e.com登录到我的网站,但使用贝宝帐户sample@s.com进行支付,那么我该如何与该用户匹配.

I know 0 about IPN but for example : If a user signs up to my website with example@e.com but uses the paypal account sample@s.com to pay then how to i match up the user.

我了解到,PDT不会发出用于重复(订阅)付款的交易ID(tx),这是真的吗?

I read that PDT do not send out a transaction ID (tx) for recurring (subscription) payments is that true ?

这一切都需要帮助...诚实而又简单:)

Just need help with it all... honest and easy :)

谢谢.

推荐答案

是的,有时候很难理解Paypal及其所有文档,但是对于任何订阅,我都会推荐Paypal IPN.您可以在贝宝帐户中设置IPN URL,例如: http://www.domain.com/ipn.php .然后,您在贝宝帐户中创建一个订阅按钮,您可以在其中设置价格,循环价格等.

Yeah sometimes is hard to understand Paypal and all their documentation but for any kind of subscription i would recommend Paypal IPN. You set IPN URL in your paypal account for example: http://www.domain.com/ipn.php. Then you create a subscription button in paypal account where you can set the price, recurring price etc.

有关Paypal IPN的更多信息,您可以在这里阅读: https://www.paypal.com/ipn

More about Paypal IPN you can read here: https://www.paypal.com/ipn

在创建Paypal按钮时,您还可以添加一些自定义字段,以帮助您确定哪个客户真正付款.因此,例如,您有一个用户数据库,并且有一个用户,其用户标识为100,用户名为昵称,并且registered_email=xxx@gmail.com.现在,您可以决定将userid = 100添加为自定义字段,并将其添加到Paypal按钮.例如CUSTOM = 100.

When creating Paypal button you can also add some custom fields which can help you determine which customer really pays. So for example you have a database of users and there is user with userid=100, username=Nickname and registered_email=xxx@gmail.com. Now you can decide to add userid=100 as a custom field and add this to paypal button. For example CUSTOM=100.

ipn.php是处理所有逻辑的脚本.用户付款时,Paypal会将任何状态发送到 http://www.domain.com/ipn.php(您在贝宝帐户中将此设置为IPN URL).因此,在这种情况下,ipn.php需要检查付款是否完成且状态是否正常.然后检索一个CUSTOM字段($ _POST ['custom']),在这种情况下为100(用户ID).然后使用用户更新您的数据库,并以某种方式标记该用户在状态为完成"的情况下当然已经付费.

ipn.php in this case is a script which handles all the logic. When user pay, Paypal send any status to http://www.domain.com/ipn.php (you set this in your paypal account as IPN URL). So ipn.php in this case needs to check if payment is complete and status is ok. Then retrieve a CUSTOM field ($_POST['custom']) which is in this case 100 (userid). And then update your database with users and somehow mark that this user payed of course if status is Completed.

希望这会有所帮助.但是在这种情况下,用户从哪个贝宝帐户付款以及在数据库中注册哪个并不重要.您所需要的只是以某种方式将其链接在一起.在这种情况下,请使用userid或类似的名称.

Hope this helps a little. But in this case it's not really important from which paypal account user pays and which is registered in your database. All you need is that you somehow link it together. In this case with userid or something like that.

这篇关于PayPal订阅PDT/IPN-请的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆