0
votes

I am using paypal IPN to make a subscription transaction. I created a subscription button from my sandbox paypal account, and tested the whole process. The first time i tried, it seemed to work okay, but the second, third and fourth time paypal IPN returned different variables from the first time.

First time important variables were: payment_gross,txn_id

Then it started to give me: amount3,mc_amount3

So payment_gross became amount3 or mc_amount3 and txn_id is not returned anymore. I did not change anything in the generated form. Any suggestions?

Sorry for my English

Thank you

1
You should get a subscr_id with subscriptions and txn_id with other payments. - user2289845

1 Answers

0
votes

When your ipn callback is called you must always first verify the message with paypal. Are you doing this? Only then can you be sure it is a legitimate message.

I don't recall ever getting a message without txn_id, and I've used the sandbox a lot for testing. I can't imagine paypal sending a message without txn_id via IPN as it would not relate to any transaction. The documentation does not mention this as a possibility either.

Anyway here is where I look up all the IPN/PDT variables for my site.