Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Added check for setting governing what email address to use as paymen…

…t receiver.
  • Loading branch information...
commit d6deaf9b9722d4ecd5fa57f6d5c28c67446c2f56 1 parent d9718bc
@chrisglass authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 shop_paypal/
6 shop_paypal/
@@ -1,5 +1,6 @@
#-*- coding: utf-8 -*-
from decimal import Decimal
+from django.conf import settings
from django.conf.urls.defaults import patterns, url, include
from django.shortcuts import render_to_response
from paypal.standard.forms import PayPalPaymentsForm
@@ -8,7 +9,7 @@
class OffsitePaypalBackend(object):
- Glue code to let django-SHOP talk to merchant's paypal backend.
+ Glue code to let django-SHOP talk to django-paypal's.
The django-paypal package already defines an IPN view, that logs everything
to the database (desirable), and fires up a signal.
@@ -27,6 +28,7 @@ class OffsitePaypalBackend(object):
def __init__(self, shop): = shop
success_signal.connect(self.payment_was_successful, weak=False)
+ assert settings.PAYPAL_RECEIVER_EMAIL, "You need to define a PAYPAL_RECEIVER_EMAIL in settings with the money recipient's email addresss"
def get_urls(self):
urlpatterns = patterns('',
@@ -60,7 +62,7 @@ def view_that_asks_for_money(self, request):
order =
paypal_dict = {
- "business": "",
+ "business": settings.PAYPAL_RECEIVER_EMAIL,
Please sign in to comment.
Something went wrong with that request. Please try again.