-------------------------------- PayPal Website Payments Standard -------------------------------- `PayPal Website Payments Standard`_ (PWS) is an offsite payment processor. This method of payment is implemented in merchant as a wrapper on top of `django-paypal`_. You need to install the package to be able to use this payment processor. For a list of the fields and settings attribute expected, please refer to the PWS and django-paypal documentation. After a transaction, PayPal pings the notification URL and all the data sent is stored in the `PayPalIPN` model instance that can be viewed from the django admin. Test or Live Mode ----------------- By default the form renders in test mode with POST against sandbox.paypal.com. Add following to you `settings.py` to put the form into live mode:: ### Django Merchant MERCHANT_TEST_MODE = False PAYPAL_TEST = MERCHANT_TEST_MODE Example ------- In urls.py:: pay_pal = get_integration("pay_pal") urlpatterns += patterns('', (r'^paypal-ipn-handler/', include(pay_pal.urls)), ) In views.py:: >>> from billing import get_integration >>> pay_pal = get_integration("pay_pal") >>> pay_pal.add_fields({ ... "business": "paypalemail@somedomain.com", ... "item_name": "Test Item", ... "invoice": "UID", ... "notify_url": "http://example.com/paypal-ipn-handler/", ... "return_url": "http://example.com/paypal/", ... "cancel_return": "http://example.com/paypal/unsuccessful/", ... "amount": 100}) >>> return render_to_response("some_template.html", ... {"obj": pay_pal}, ... context_instance=RequestContext(request)) In some_template.html:: {% load paypal from paypal_tags %} {% paypal obj %} Template renders to something like below:: .. _`PayPal Website Payments Standard`: https://merchant.paypal.com/cgi-bin/marketingweb?cmd=_render-content&content_ID=merchant/wp_standard .. _`django-paypal`: https://github.com/dcramer/django-paypal