I had missed some settings that needed to be obtained from django.conf.settings

pull/1/head
Raymond Yee 2011-10-07 09:53:30 -07:00
parent f9375dcea1
commit ac7deebf9a
2 changed files with 4 additions and 3 deletions

View File

@ -226,8 +226,8 @@ class Preapproval( object ):
'X-PAYPAL-RESPONSE-DATA-FORMAT':'JSON',
}
return_url = BASE_URL + COMPLETE_URL
cancel_url = BASE_URL + CANCEL_URL
return_url = settings.BASE_URL + COMPLETE_URL
cancel_url = settings.BASE_URL + CANCEL_URL
# set the expiration date for the preapproval
now = datetime.datetime.utcnow()
@ -246,7 +246,7 @@ class Preapproval( object ):
'returnUrl': return_url,
'cancelUrl': cancel_url,
'requestEnvelope': { 'errorLanguage': 'en_US' },
'ipnNotificationUrl': BASE_URL + 'paypalipn'
'ipnNotificationUrl': settings.BASE_URL + 'paypalipn'
}
self.raw_request = json.dumps(data)

View File

@ -2,6 +2,7 @@ from regluit.payment.manager import PaymentManager
from regluit.payment.paypal import IPN
from regluit.payment.models import Transaction
from regluit.core.models import Campaign, Wishlist
from django.conf import settings
from django.contrib.auth.models import User
from regluit.payment.parameters import *
from django.http import HttpResponse, HttpRequest, HttpResponseRedirect