PayPal/IPN/example

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
< PayPal‎ | IPN
Revision as of 03:08, 3 January 2009 by Woozle (talk | contribs) (extracted from IPN page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

About

This shows an example of HTML to generate a "Subscribe" button configured to use the PayPal Sandbox (not a real transaction), and the data passed back to the merchant's server via IPN, as collected by SpecialLogPost:

HTML form code

<xml> <form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_s-xclick"> <input type="hidden" name="hosted_button_id" value="14406"> <input type="hidden" name="custom" value="UserNameWouldGoHere"> <input type="hidden" name="invoice" value="InvoiceFieldGoesHere"> <input type="hidden" name="notify_url" value="http://wiki.vbz.net/Special:LogPost"> <input type="hidden" name="return" value="http://test.vbz.net/cgi-bin/runpl"> <input type="image" src="https://www.sandbox.paypal.com/en_US/i/btn/btn_subscribeCC_LG.gif"

border="0" name="submit" alt="">

<img alt="" border="0" src="https://www.sandbox.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1"> </form> </xml>

IPN POSTed data

2009-01-01 21:58:16
	REQUEST_METHOD	POST
	HTTP_USER_AGENT	
	REMOTE_ADDR	216.113.191.33
		transaction_subject	
		payment_date	18:58:14 Jan 01, 2009 PST
		txn_type	subscr_payment
		subscr_id	S-5G6357170N2927728
		last_name	User
		residence_country	US
		item_name	Full Site Access - one year
		payment_gross	49.00
		mc_currency	USD
		business	paypal_1230320215_biz@hypertwins.org
		payment_type	instant
		protection_eligibility	Ineligible
		verify_sign	AxvQhTcd4JBdIIpB5MztE755SMD7AMz0sJLKKvdDiqzSP8TKRFoLHttM
		payer_status	verified
		test_ipn	1
		payer_email	paypal_1230659178_per@hypertwins.org
		txn_id	17R310755W630331M
		receiver_email	paypal_1230320215_biz@hypertwins.org
		first_name	Test
		invoice	InvoiceFieldGoesHere
		payer_id	9AAMA7CUQ8TUN
		receiver_id	YCRD6GWFSUZ5L
		payment_status	Completed
		payment_fee	1.72
		mc_fee	1.72
		btn_id	14406
		mc_gross	49.00
		charset	windows-1252
		notify_version	2.6
2009-01-01 21:58:16
	REQUEST_METHOD	POST
	HTTP_USER_AGENT	
	REMOTE_ADDR	216.113.191.33
		txn_type	subscr_signup
		subscr_id	S-5G6357170N2927728
		last_name	User
		residence_country	US
		mc_currency	USD
		item_name	Full Site Access - one year
		business	paypal_1230320215_biz@hypertwins.org
		amount3	49.00
		recurring	1
		verify_sign	AdXmlE88KERMphmdMG4e.jeWGlkRAcUYzJVdMfWdteAAmuWxx9bpnguV
		payer_status	verified
		test_ipn	1
		payer_email	paypal_1230659178_per@hypertwins.org
		first_name	Test
		receiver_email	paypal_1230320215_biz@hypertwins.org
		payer_id	9AAMA7CUQ8TUN
		invoice	InvoiceFieldGoesHere
		reattempt	1
		subscr_date	18:58:12 Jan 01, 2009 PST
		btn_id	14406
		charset	windows-1252
		notify_version	2.6
		period3	1 Y
		mc_amount3	49.00

Note that IPN returns the invoice data but not the custom data.