Commits

Anonymous committed 0da0a2d

in paypalpartial module, return address scheme that does not throw an error

Comments (0)

Files changed (1)

satchmo/apps/payment/modules/paypalpartial/views.py

 from decimal import Decimal
 from django.conf import settings
+from django.contrib.sites.models import Site
 from django.core import urlresolvers
 from django.http import HttpResponse, HttpResponseRedirect
 from django.shortcuts import render_to_response
     else:
         url = payment_module.POST_TEST_URL.value
         account = payment_module.BUSINESS_TEST.value
-
-    try:
-        address = lookup_url(payment_module,
-            payment_module.RETURN_ADDRESS.value, include_server=True)
-    except urlresolvers.NoReverseMatch:
-        address = payment_module.RETURN_ADDRESS.value
+        
+    
+    #get url for return link
+    s = Site.objects.all()[0]
+    address = "http://"+s.domain+payment_module.RETURN_ADDRESS.value ###HACK
+    log.debug("return address: %s" % address)
 
     try:
         cart = Cart.objects.from_request(request)