I’m using the PayPal sandbox to do a subscribe button and then when I get the IPN response for a subscription or a subscription cancelation $_POST[‘txn_id’] is never set.
So I don’t know how to identify transactions to only accept unique ones
Thanks!
EDIT: for example all the info that I have in POST for a subscr_cancel are : amount1, amount3 , address_status, subscr_date, payer_id, address_street, mc_amount1, mc_amount3, charset, address_zip, first_name, reattempt, address_country_code, address_name, otify_version
subscr_id
custom
payer_status
business
address_country
address_city
verify_sign
payer_email
btn_id
last_name
address_state
receiver_email
recurring
txn_type
item_name
mc_currency
residence_country
test_ipn
period1
period3
correlation_id
According to Table 2. Summary of subscription variables:
As expected, PayPal will not send the
txn_idto your IPN for the transaction type,subscr_cancel, and will only sendtxn_idif the transaction type issubscr_payment.For further explanation on which variables are sent to your IPN URL based on your transaction, please check out IPN and PDT Variables.