"> 使用它我将在 paypa-6ren">
gpt4 book ai didi

php - 如何在 Cron 作业中检查 Paypal 经常性用户的付款状态?

转载 作者:太空宇宙 更新时间:2023-11-03 16:24:26 24 4
gpt4 key购买 nike

我正在研究在 php 中使用 Paypal 的基于订阅的支付选项

下面是我用于订阅支付的表格

<form name = "myform" action = "https://www.sandbox.paypal.com/cgi-bin/webscr" method = "post" target = "_top">
<input type="hidden" name="cmd" value="_xclick-subscriptions">
<input type = "hidden" name = "business" value = "test-facilitator@sample.com">
<input type="hidden" name="lc" value="US">
<input type = "hidden" name = "item_name" value = "Patient Trasportation">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="src" value="1">
<!--<input type="hidden" name="srt" value="1">-->
<input type="hidden" name="a3" value="<?php echo $price; ?>">
<input type="hidden" name="p3" value="1">
<input id="subValue" type="hidden" name="t3" value="">
<input type="hidden" name="currency_code" value="USD">
<input type = "hidden" name = "cancel_return" value = "http://www.example/Process">
<input type = "hidden" name = "return" value = "http://www.example/buy">
<input type="hidden" name="bn" value="PP-SubscriptionsBF:btn_subscribeCC_LG.gif:NonHostedGuest">
<input type='hidden' name='rm' value='2'>
<input type="hidden" name="cbt" value="Return to The Store">
<input type="hidden" name="custom" value="<?php echo $last_ins_id; ?>">
<input type="submit" class='btn btn-primary btn-paypal' value="Pay with Paypal">
</form>

使用它我将在 paypal 成功返回后存储所需的付款详细信息,返回值如下,

Array
(
[txn_type] => subscr_signup
[subscr_id] => I-WJ5JU5F5J4EL
[last_name] => singh
[residence_country] => US
[mc_currency] => USD
[item_name] => Test
[business] => test.zerosoft-facilitator@sample.com
[amount3] => 40.00
[recurring] => 1
[address_street] => 1 Main St
[payer_status] => verified
[payer_email] => test@test.com
[address_status] => confirmed
[first_name] => test
[receiver_email] => test.zerosoft-facilitator@sample.com
[address_country_code] => US
[payer_id] => RTNTA7JN44S7S
[address_city] => San Jose
[reattempt] => 1
[payer_business_name] => mano singh's Test Store
[address_state] => CA
[subscr_date] => 03:54:15 Jul 28, 2016 PDT
[address_zip] => 95131
[custom] => 206
[charset] => windows-1252
[period3] => 1 W
[address_country] => United States
[mc_amount3] => 40.00
[address_name] => Test Store
[auth] => AimgDlXpiQ7gYXJgDylV-75JQwlPSBkduKhg79fKg2.8qxXDZ4w51lgCVLg.20WJk1jT0USO27QbLUZBnGZKm8A
[form_charset] => UTF-8
)

现在我需要使用 Cron 作业每月检查一次所有用户的付款状态并检查他们的付款状态并增加他们的有效日期或阻止他们。我用谷歌搜索了一个没有得到解决方案的任何帮助表示赞赏。

提前致谢

最佳答案

使用标准订阅时,没有可用于点击和提取配置文件详细信息的 API,但每次处理付款时您都会获得额外的 IPN,因此您可以仅基于它进行更新,而不是使用 cron 作业。

关于php - 如何在 Cron 作业中检查 Paypal 经常性用户的付款状态?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38638428/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com