有关 payment_status 的帮助 PayPal 退款 已撤销 部分退款 IPN

发布于 2024-10-19 21:48:48 字数 979 浏览 3 评论 0原文

如果会员订阅和/或支付一次付款并且他们请求退款、撤销或部分退款,下面的脚本是否可以与通过 IPN 发送的 IPN 消息一起使用?

if($payment_status == "Refunded" || $payment_status == "Reversed" || $payment_status == "Partially Refunded"){
mysql_query("UPDATE members SET month_date = '$gettoday', subscr_id = '$subscr_id', subscr_cancel = 'Y', active = 'N', prepay = 'N' WHERE id='$id'");
}

如果没有,我可以使用什么或如何用 PHP 编写脚本,使我的系统读取所有的 IPN payment_status 并知道哪个订阅者(通过他们的 PayPal 订阅 ID 或我系统中的会员 ID)或付款人((通过他们的会员 ID)在我的系统中)在发送其中之一时执行操作?

另外,如果我想检查订阅 ID,这样做会更聪明吗?

if($payment_status == "Refunded" || $payment_status == "Reversed" || $payment_status == "Partially Refunded"){

if($subscr_id){

mysql_query("UPDATE members SET month_date = '$gettoday', subscr_id = '$subscr_id', subscr_cancel = 'Y', active = 'N', prepay = 'N' WHERE id='$id'");

} else {

mysql_query("UPDATE members SET month_date = '$gettoday', subscr_cancel = 'Y', active = 'N', prepay = 'N' WHERE id='$id'");

}}

Will this script below work with the IPN Messages Sent with IPNs if the member is on a subscription and/or pay once payment and they request a Refund, Reversal, or Partial Refund?

if($payment_status == "Refunded" || $payment_status == "Reversed" || $payment_status == "Partially Refunded"){
mysql_query("UPDATE members SET month_date = '$gettoday', subscr_id = '$subscr_id', subscr_cancel = 'Y', active = 'N', prepay = 'N' WHERE id='$id'");
}

If not, what can I use or how do I script it in PHP to make my system read the IPN payment_status of all and know what subscriber (by their PayPal Subscribe ID or Member ID in my system) or payer ((By their Member ID in my system) to perform actions on when one of these are sent?

Also, If I wanted to check for a subscribe ID will it be smarter to do it like this?

if($payment_status == "Refunded" || $payment_status == "Reversed" || $payment_status == "Partially Refunded"){

if($subscr_id){

mysql_query("UPDATE members SET month_date = '$gettoday', subscr_id = '$subscr_id', subscr_cancel = 'Y', active = 'N', prepay = 'N' WHERE id='$id'");

} else {

mysql_query("UPDATE members SET month_date = '$gettoday', subscr_cancel = 'Y', active = 'N', prepay = 'N' WHERE id='$id'");

}}

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

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

发布评论

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

评论(1

旧夏天 2024-10-26 21:48:48

Paypal将首先发送一个表示付款状态已逆转的IPN,然后发送另一个表示状态已退款的IPN。因此,我不会像您在原始示例中那样同时包含已撤销和已退款。

至于 user_id 的测试,这始终是一致的,每个 IPN 都包含付款人 Paypal 电子邮件,其中包括撤消/退款消息。

Paypal will first send an IPN that the payment status is reversed, followed by another IPN with the status refunded. So, I would not include both reversed and refunded as you did in your original example.

As for testing for the user_id, that's always consistent, every IPN includes the payers paypal email including the reversed/refunded messages.

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