定期付款,收到transaction_id

时间:2014-08-20 17:01:09

标签: paypal paypal-subscriptions recurring-billing

如果我们通过网站上的订阅按钮进行定期付款,那么paypal返回的数据是什么?

我们如何获得transaction_id?

我们希望我们的用户使用信用卡付款而无需注册,但到目前为止,我们无法获得transaction_id直接获取网站上自动流程的信息。相反,我们必须通过paypal帐户管理它。我们怎样才能避免呢?

1 个答案:

答案 0 :(得分:0)

您应该使用PayPal IPN功能,您将在其中指定您的IPN网址,PayPal将向该网址发布包含交易ID的所有交易相关数据。以下是订阅事务完成时通常发布的示例数据。

Array
(
    [0] => mc_gross=12.00
    [1] => protection_eligibility=Eligible
    [2] => address_status=confirmed
    [3] => payer_id=XCACACACCAX
    [4] => address_street=1+Main+St%0D%0Aasdasf
    [5] => payment_date=02%3A52%3A45+Jul+21%2C+2014+PDT
    [6] => payment_status=Completed
    [7] => charset=UTF-8
    [8] => address_zip=95131
    [9] => first_name=Test+Personal+Test
    [10] => mc_fee=0.65
    [11] => address_country_code=US
    [12] => address_name=AAAA+Personal+Test+Account
    [13] => notify_version=3.8
    [14] => subscr_id=I-SAD8U8BK8E62
    [15] => payer_status=verified
    [16] => business=TEST%40business.co.in
    [17] => address_country=United+States
    [18] => address_city=San+Jose
    [19] => verify_sign=AitFUzqO8ZXxGicaEa14GLIKyp.1AiUxEhkGTuMGalNusuo72mQApzS1
    [20] => payer_email=TESTING%40personal.co.in
    [21] => contact_phone=408-767-7151
    **[22] => txn_id=3XN896582B789115H**
    [23] => payment_type=instant
    [24] => last_name=Account
    [25] => address_state=CA
    [26] => receiver_email=TEST%40business.co.in
    [27] => payment_fee=0.65
    [28] => receiver_id=XXXXXXXX
    [29] => txn_type=subscr_payment
    [30] => item_name=csacdas
    [31] => mc_currency=USD
    [32] => residence_country=US
    [33] => test_ipn=1
    [34] => transaction_subject=csacdas
    [35] => payment_gross=12.00
    [36] => ipn_track_id=cbe04d91c0d90
)

您可以获得与IPN here相关的更多信息。

如果您愿意通过信用卡(拥有PayPal帐户)向买家提供付款,那么您需要注册ERP(增强型定期付款),这是一个补充。您可以使用this获取更多信息。