Skip to content

Instantly share code, notes, and snippets.

@guerrerocarlos
guerrerocarlos / paypal.py
Created November 9, 2012 20:43
Paypal payment checking function
import urllib
import urllib2
def paypal_check(tx,at):
success = False
post_data = [('cmd','_notify-synch'),('tx',tx),('at',at)] # a sequence of two element tuples
result = urllib2.urlopen('https://www.paypal.com/cgi-bin/webscr', urllib.urlencode(post_data))
content = result.read().split('\n')
results = {}