Regrading paypal IPN variables?

Question by Edison L: Regrading paypal IPN variables?
Hi,

I found a IPN script generator, and i have tested the code with sandbox. the script return me ten thousand variables ( only 15 actually ) and i do not know which one is the price.

example i want to sell a product for $ 50 which variable do i use to get it?

Below is an example of what i see :

test_ipn = 1; payment_type = instant; payment_date = 05:07:09 Nov. 19, 2008 PST ;payment_status = Completed ;address_status = confirmed; payer_status = verified; first_name = John; last_name = Smith; payer_email = buyer@paypalsandbox.com ;payer_id = TESTBUYERID01; address_name = John Smith ;address_country = United States ;address_country_code = US address;_zip = 95131 ;address_state = CA; address_city = San Jose address_street = 123, any street; business = seller@paypalsandbox.com receiver_email = seller@paypalsandbox.com; receiver_id = TESTSELLERID1 ;residence_country = US item_name = something; item_number = AK-1234; quantity = 1; shipping = 3.04; tax = 2.02; mc_currency = USD; mc_fee = 0.44; mc_gross = 5000000; mc_gross1 = 9.34; txn_type = web_accept; txn_id = 91119137; notify_version = 2.1 ;custom = xyz12; charset = windows-1252;
verify_sign = AFcWxV21C7fd0v3bYYYRCpSSRl31AA-sw9j6Mmegmndg9kciRPxSAykX

Best answer:

Answer by Jamie
I believe it’s mc_gross that you’d want.

You’ll want to make sure the receiver_email is YOUR email and the txn_id is valid, too.

The problem is, if you don’t verify the sender email, someone could “fake” an IPN event, sending themselves the money instead of you.

If you don’t validate the TXN_ID, someone could fake an IPN event. (making your software “think” paypal sent you some money)

You have to be careful of these things.

What do you think? Answer below!

Get the book now