2011-10-06 143 views
5

我遇到了貝​​寶定期付款的問題。 CreateRecurringPaymentsProfile()返回創建的配置文件(ProfileID)的ID。同時,我在IPN網址上收到以下確認:貝寶定期付款IPN確認

payment_cycle - Daily 
txn_type - recurring_payment_profile_ 
created 
last_name - User 
next_payment_date - 03:00:00 Oct 06, 2011 PDT 
residence_country - US 
initial_payment_amount - 0.00 
currency_code - USD 
time_created - 23:21:02 Oct 05, 2011 PDT 
verify_sign - ... 
period_type - Regular 
payer_status - verified 
test_ipn - 1 
tax - 0.00 
payer_email - ... 
first_name - Test 
receiver_email - ... 
payer_id - ... 
product_type - 1 
shipping - 0.00 
amount_per_cycle - 20.00 
profile_status - Active 
charset - windows-1252 
notify_version - 3.4 
amount - 20.00 
outstanding_balance - 0.00 
---------->recurring_payment_id - I-6EFKVB5FXRGH 
product_name - Ultimate Account 
ipn_track_id - ... 

很明顯,ProfileID和recurring_payment_id是相等的。在此之後,一個關於支付確認被接收:

mc_gross - 20.00 
outstanding_balance - 0.00 
period_type - Regular 
next_payment_date - 03:00:00 Oct 07, 2011 PDT 
protection_eligibility - Ineligible 
payment_cycle - Daily 
tax - 0.00 
payer_id - WR942TMLKNKZE 
payment_date - 04:38:37 Oct 06, 2011 PDT 
payment_status - Completed 
product_name - Ultimate Account 
charset - windows-1252 
---------->recurring_payment_id - I-5S42CVRD6HPC 
first_name - Test 
mc_fee - 0.88 
notify_version - 3.4 
amount_per_cycle - 20.00 
payer_status - verified 
currency_code - USD 
business - ... 
verify_sign - ... 
payer_email - ... 
initial_payment_amount - 0.00 
profile_status - Active 
amount - 20.00 
txn_id - 2XB154738E303273C 
payment_type - instant 
last_name - User 
receiver_email - ... 
payment_fee - 0.88 
receiver_id - ... 
txn_type - recurring_payment 
mc_currency - USD 
residence_country - US 
test_ipn - 1 
transaction_subject - 
payment_gross - 20.00 
shipping - 0.00 
product_type - 1 
time_created - 03:32:45 Sep 29, 2011 PDT 
ipn_track_id - ... 

這些3個值:簡檔在CreateRecurringPaymentsProfile的回報(); recurring_payment_profile_created中的recurring_payment_id; recurring_payment中的recurring_payment_id - 應該相同。 (因爲似乎沒有其他方法可以正確識別此特定訂閱的付款) 此外,recurring_payment(在IPN上)由Paypal多次發送,每次recurring_payment_id都不同。

我應該使用recurring_payment_id來確定特定訂閱的付款還是有另一種正確的方法來識別它?

回答

8

配置文件ID = recurring_payment_id。如果recurring_payment_id不同,我們正在討論不同的ProfileID(換句話說:不同的定期付款配置文件)。

+0

謝謝,但這正是我談論的問題。我已經清理了所有以前的交易/配置文件,並且只有一個配置文件(在PayPal的沙箱中) - 我仍然得到不同的ProfileID和recurring_payment_id。 –

+0

我知道這是一箇舊的線程,但我只是問自己同樣的問題,所以我剛剛測試了它,並且我得到了兩次相同的ID。在嘗試之前,我還清理了所有配置文件。 CreateRecurringPaymentsProfile API調用返回給我[PROFILEID] => I-L9VFD2G8KW5L,並且txn_type「recurring_payment_profile_created」的IPN消息顯示「recurring_payment_id」:「I-L9VFD2G8KW5L」,「recurring_payment」IPN也是如此,所以我認爲您應該很好IPN消息中的內容。也許這是舊API版本的問題。 – MrUpsidown

+0

也處理相同的問題,所以我想我會補充:機會是你獲得不同價值的原因recurring_payment_id的是因爲你在沙箱中設置了多個訂閱。您在沙箱中開始的每個單獨的定期付款都將攜帶一個不同的recurring_payment_id(和ProfileID),因此請確保您牢記在心:) – jball037