我在处理这个 paypal 付款方面遇到了很多麻烦......
Am having a lot of trouble getting my head around this paypal payment stuff...
我如何确认用户已成功注册我的订阅?
我对 IPN 了解 0,但例如:如果用户使用 example@e.com 注册我的网站,但使用 paypal 帐户 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.然后您在 paypal 帐户中创建一个订阅按钮,您可以在其中设置价格、重复价格等.
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 按钮时,您还可以添加一些自定义字段,以帮助您确定哪个客户真正付款.例如,您有一个用户数据库,其中有 userid=100、username=Nickname 和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需要检查支付是否完成,状态是否正常.然后检索自定义字段 ($_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.
希望这会有所帮助.但在这种情况下,用户从哪个 paypal 帐户付款以及哪个在您的数据库中注册并不重要.您所需要的只是以某种方式将它们链接在一起.在这种情况下,使用 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.
这篇关于贝宝订阅 PDT/IPN - 请的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!