PayPal txn_id IPN 检查

发布于 2024-12-29 15:24:24 字数 324 浏览 0 评论 0原文

首先我要说的是,是的!我确实浏览了“具有类似标题的问题”,但找不到我的问题的答案。我在我的网站上有会员资格,每次用户购买高级版时,他们都会获得 1 个月的会员资格(存储在数据库中为 unix_timestamp),这背后的逻辑是每次他们购买时,它只是将其添加到时间戳

date("t") * 24 * 60 * 60

日期(“t”)中一个月中的给定天数。

我正在使用 PayPal IPN,它希望我检查 txn_id 是否存在。我以前从未使用过 PP IPN,所以我不知道那是什么?是为了防止骗子吗?假设它存在,是否意味着用户正在尝试进行相同的付款?

Let me start by saying that, Yes! I did go through "Questions with similar titles" and couldn't find an answer to what my question is gonna be. I have a membership on my website, every time user purchases premium they get 1 month of membership (Stored in database as unix_timestamp) and the logic behind this is every time they purchase, it just adds this to timestamp

date("t") * 24 * 60 * 60

date("t") is the given number of days in a month.

I am using PayPal IPN and it wants me to check if txn_id exists. I've never used PP IPN before so I don't know what the roll of that is? Is it to prevent scammers? And lets say if it exists, does it mean that the user is trying to make same payment?

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

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

发布评论

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

评论(1

音栖息无 2025-01-05 15:24:24

这是为了防止“越线”并且您两次收到同一付款的通知。
- 因此,您不会在 2 个月内向您的用户发放积分,而她实际上只支付了 1 个月的费用。

前任。如果您对第一个通知的验证/确认太慢,他们会再次发送
- 看起来你的系统是一个新系统..(除了它具有相同的 txn_id)

It's in case "lines get crossed" and you receive notification of the same payment twice.
- so you don't credit your user for 2 months, when she's actually only paid for one.

Ex. if your verification/confirmation of the first notification is too slow, they'll send it again
- appearing to you're system as a new one.. (except, it has the same txn_id)

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