[英]Update expiry date after recurring payment and Paypal
I'm looking to use Paypal
to accept Credit Cards for a subscription service site. 我希望使用Paypal
接受订阅服务网站的信用卡。 For example, someone would subscribe to the site and pay monthly. 例如,某人会订阅该网站并每月付款。 If they cancel, they would lose access to the site. 如果取消,则将无法访问该站点。
Customers would pay and get one month access and be billed monthly. 客户将支付并获得一个月的访问权限,并按月计费。 Upon initially subscribing, an expiry date would be stored on the user account and if expired, the customer would lose access to the site. 最初订阅后,有效期将存储在用户帐户中,如果过期,则客户将无法访问该站点。
How would I go about pushing the expiry date back one month every time a payment goes through successfully using Paypal
and PHP
? 每当使用Paypal
和PHP
成功完成Paypal
,我将如何将到期日期推迟一个月?
Is this the best way to go about handling these kinds of subscriptions? 这是处理此类订阅的最佳方法吗?
Thanks for any input! 感谢您的输入!
UPDATE
: Once the subscription is made a PROFILEID
number is given by Paypal and I will store it in a database. UPDATE
:进行订阅后,贝宝会提供一个PROFILEID
号,我将其存储在数据库中。 Whenever a user logs in, I want to query Paypal
to see if they have paid using the the PROFILEID
tied to the account. 每当用户登录时,我都想查询Paypal
以查看他们是否已使用绑定到该帐户的PROFILEID
进行了付款。
How would I go about querying Paypal
for that? 我该如何查询Paypal
?
There are two ways for doing this:- 有两种方法可以做到这一点:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.