Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PayPal IPN $_POST['txn_id'] not set

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

like image 471
Jerome Ansia Avatar asked Jan 31 '12 15:01

Jerome Ansia


People also ask

How do I enable IPN in PayPal?

Click the settings icon at the top of your PayPal account page and then click Account Settings. On the Notifications page, click the Update link for the Instant payment notifications item. Click Choose IPN Settings to specify your listener's URL and activate the listener.

How do I find my PayPal IPN history?

View IPN messages and details. Use the IPN History page on the PayPal website to view IPN messages sent to your listener URL from PayPal, and to request that messages be resent. Select the IPN messages to review. You can specify a date range, delivery status, and PayPal transaction ID.

What is a IPN code?

The International Performer Number (IPN) is a unique universal identifier allocated to every single PPL-registered performer as well as performers registered with other collective management organisations (CMOs). This ID number is used to identify a performer in exchanges with other CMOs around the world.

What is IPN PHP?

IPN is a message service that sends you a notification when any type of transaction occurs in your account. The messages are received and processed by your server(s).


1 Answers

According to Table 2. Summary of subscription variables:

For subscription variables, the transaction ID (txn_id) is only available for USD Payment and Multi-Currency Payment transaction types (txn_type).

As expected, PayPal will not send the 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 further explanation on which variables are sent to your IPN URL based on your transaction, please check out IPN and PDT Variables.

like image 157
Josh Avatar answered Oct 09 '22 14:10

Josh