Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

now using import from from rather than global import form

  • Loading branch information...
commit 466b9ed39cb9b7219f68a9b35d078e3fa68fdec0 1 parent a1d048b
@jrief authored
Showing with 6 additions and 4 deletions.
  1. +6 −4 ipayment/offsite_backend.py
View
10 ipayment/offsite_backend.py
@@ -11,9 +11,11 @@
from django.core.exceptions import SuspiciousOperation
from django.shortcuts import render_to_response
from django.template import Context, Template, RequestContext
-from django.http import HttpResponse, HttpResponseBadRequest, HttpResponseServerError
+from django.http import HttpResponse, HttpResponseRedirect, \
+ HttpResponseBadRequest, HttpResponseServerError
from django.views.decorators.csrf import csrf_exempt
-import forms
+from forms import SessionIPaymentForm, SensibleIPaymentForm, ConfirmationForm
+from models import Confirmation
class OffsiteIPaymentBackend(object):
'''
@@ -73,7 +75,7 @@ def view_that_asks_for_money(self, request):
if settings.IPAYMENT['useSessionId']:
# sensible data is send to IPayment in a separate SOAP call
ipaymentData['ipayment_session_id'] = self.getSessionID(request, order)
- form = forms.SessionIPaymentForm(ipaymentData)
+ form = SessionIPaymentForm(ipaymentData)
else:
# sensible data is send using this form, but signed to detect manipulation attempts
ipaymentData['trxuser_id'] = settings.IPAYMENT['trxUserId']
@@ -86,7 +88,7 @@ def view_that_asks_for_money(self, request):
ipaymentData['silent_error_url'] = processorUrls['silentErrorUrl']
ipaymentData['hidden_trigger_url'] = processorUrls['hiddenTriggerUrl']
ipaymentData['trx_securityhash'] = self.calcTrxSecurityHash(ipaymentData)
- form = forms.SensibleIPaymentForm(ipaymentData)
+ form = SensibleIPaymentForm(ipaymentData)
rc = RequestContext(request, { 'form': form, 'extra': extra, })
return render_to_response("payment.html", rc)
Please sign in to comment.
Something went wrong with that request. Please try again.