PayPal IPN $ _POST ['txn_id'] not installed

I use the PayPal sandbox to make a subscribe button, and then when I get an IPN response to subscribe or unsubscribe, $ _POST ['txn_id'] is never set.

Therefore, I do not know how to identify transactions in order to accept only unique

Thanks!

EDIT: for example, all the information I have in POST for subscr_cancel is: amount1, amount3, address_status, subscr_date, payer_id, address_street, mc_amount1, mc_amount3, charset, address_zip, first_name, reattempt, address_country_code_idify_erid_name regular address_countryat_id_name_name address_country Address City verify_sign payer_email btn_id Last name address_state receiver_email repeating txn_type item name mc_currency Country of residence test_ipn period1 period1 correlation_id

+6
source share
2 answers

According to Table 2. Summary of subscription variables :

For subscription variables, the transaction identifier (txn_id) is available only for payments in US dollars and Transaction types with multiple currencies (txn_type).

As expected, PayPal will not send txn_id to your IPN for the transaction type, subscr_cancel and will only send txn_id if the transaction type is subscr_payment .

For a further explanation of which variables are sent to your IPN URL based on your transaction, check out the IPN and PDT variables .

+6
source

You marked $_REQUEST['txn_id'] , as this can be sent to your server via GET .

0
source

Source: https://habr.com/ru/post/907326/


All Articles