【问题标题】:How to Check Paypal Recurring Users payment status in Cron job?如何在 Cron 作业中检查 Paypal 经常性用户的付款状态?
【发布时间】:2016-12-02 23:13:11
【问题描述】:

我正在研究在 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 作业每月检查一次所有用户的付款状态并检查他们的付款状态并增加他们的有效期或阻止他们。我用谷歌搜索了一个没有得到解决方案的任何帮助表示赞赏。

提前致谢

【问题讨论】:

    标签: php paypal


    【解决方案1】:

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

    【讨论】:

    • 感谢您的回复,是否有任何API可用于获取第二次订阅详细信息和php中自动支付的下一级f\?如果您有任何参考,请在这里分享
    • 如果您希望通过 API 访问配置文件,您需要使用定期付款 API 而不是标准订阅。不过,无论是第 1 次、第 2 次还是第 1000 次付款,IPN 都会触发。
    猜你喜欢
    • 2015-10-20
    • 2010-10-23
    • 2012-06-09
    • 1970-01-01
    • 2015-01-07
    • 2013-09-20
    • 1970-01-01
    • 2014-01-18
    • 1970-01-01
    相关资源
    最近更新 更多