paypal订阅、支付信息更新

发布于 2024-08-20 00:18:51 字数 202 浏览 2 评论 0原文

我正在尝试设计一个网络应用程序(使用 php 和 mysql),在其中我将要求我的客户通过 paypal 订阅付款,它会自动检测客户 paypal 帐户中的资金并将其转移到我的 paypal 帐户。

现在,当客户在 3 个月后登录我的 Web 应用程序时,我的 Web 应用程序是否有办法知道过去 30 天内是否已从客户帐户向我的商家帐户付款。

有什么建议请

I am trying to design a web application(using php and mysql) in which I will ask my clients to pay via paypal subscription, which detects money from the clients paypal account automatically and transfers it to my paypal account.

Now when a client logs into my web application after 3 months of time, is there a way my web application to know if a payment has been made from the clients account to my merchant account in the last 30 days.

Any suggestions please

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

苹果你个爱泡泡 2024-08-27 00:18:51

我认为你必须建立一个这样的表:

id | user_id | order_id | payment_method | payment_received
-----------------------------------------------------------
1  | 8       | 7        | paypal         | 2009-12-12 16:03
2  | 6       | 9        | paypal         | 2010-02-01 12:03

如果客户已经支付了他的订单,你将在这个表中插入一条记录。
您可以使用以下查询检查客户的最后付款:

SELECT COUNT(*) FROM payments 
WHERE (payment_received + INTERVAL 30 DAY) >= NOW()
AND user_id = xx

如果结果大于 0,则您知道过去 30 天内您和客户之间有一笔交易

I think you must set up a table like this:

id | user_id | order_id | payment_method | payment_received
-----------------------------------------------------------
1  | 8       | 7        | paypal         | 2009-12-12 16:03
2  | 6       | 9        | paypal         | 2010-02-01 12:03

If the customer has payed his order, you will insert a record in this table.
You can check the last payments for your customer with this query:

SELECT COUNT(*) FROM payments 
WHERE (payment_received + INTERVAL 30 DAY) >= NOW()
AND user_id = xx

If the result is bigger than 0, you know that there was a transaction in the last 30 days between you and your customer

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文