These are my general design notes for outlining what was needed for coding.
They are probably only useful to me.

Types of paypal things?
	- payment
	- subscription?

IPN method:
	POST from paypal
		- verify:
			- "notify_version" = "1.6"
			- merchant ("receiver_email")
			
	POST back to paypal to confirm
		- set "cmd" = "_notify-validate"
		- POST to "https://www.paypal.com/cgi-bin/webscr":
			- validate certificate
"/C=US/ST=California/L=Palo Alto/O=PayPal, Inc./OU=Information Systems/CN=www.paypal.com"
		- if answer is not "VERIFIED", abort
		- verify:
			- if "payment_status" is Completed:
				- transaction ID is not old
				- item details
					"mc_gross" = price of everything
					"mc_currency" = what you expected
					"item_name"
					"item_number"
					"quantity"
					numbers appended for multiple:
					"num_cart_items"
				- subscriptions
				

		- perform action based on "payment_status"
			- Canceled_Reversal
			- Completed
			- Denied
			- Failed
			- Pending
				see "pending_reason"
			- Refunded
				see "reason_code"
			- Reversed
				see "reason_code"
		- record
			"verify_sign"
			"payment_date"
			"txn_id"
			"parent_txn_id" for Refund, Reversal, Canceled_Reversal
			"settle_amount"

			"first_name"
			"last_name"
			"payer_business_name"
			"address_name"
			"address_street"
			"address_city"
			"address_state"
			"address_zip"
			"address_country"
			"address_status"
			"payer_email"
			"payer_id"
			"payer_status"



TESTING
	- bad merchant
	- bad cert
	- "invalid" response
	- duplicate "completed"
	- "pending" then "completed"
	
