Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Latest commit 706a356
Mar 17, 2014
That was obtuse in their e-mail. But easy enough to fix as urllib2 = HTTP/1.1 and urlib is HTTP/1.0 - so we just flip which urlopen() we use. Job done.
|Failed to load latest commit information.|
README for django-paypal-driver Pluggable PayPal NVP (Name Value Pair) API implementation for Django based web applications. Installation ============ All you need to do is copying the "paypal" directory (or make a symbolink) under one of the directories in your PYTHON_PATH such as: If you are using Python 2.5; - /usr/local/lib/python2.5/site-packages/ - /usr/lib/python2.5/site-packages/ If you are using Python 2.6; - /usr/local/lib/python2.6/dist-packages/ - /usr/lib/python2.6/dist-packages/ Example ======= Once you copy the "paypal" drectory under your PYTHON_PATH; you can enter shell by typing "python manage.py shell" command under your project root. You need to define your PayPal API Credientials in your projects settings file. Those are; - PAYPAL_USER (api username) - PAYPAL_PASSWORD (api password) - PAYPAL_SIGNATURE (api signature) Then you can actually perform the following methods; In : from paypal.driver import PayPal In : p = PayPal(debug = True) In : p.SetExpressCheckout("10.00", "USD", "http://localhost/return", "http://localhost/cancel") - - - - - - - - - - You can see the error that the server sends bu calling - p.apierror Also, you can see the full response that comes from the PayPal server by typing - p.api_response when you are in python shell. - - - - - - - - - - In : p.DoExpressCheckoutPayment("USD", "10.00", "token", "payerid") Also you can refund money; In : p.RefundTransaction(transid = "transactionid", refundtype = "Partial", currency = "USD", amount = "10.00")