Private
Public Access
1
0

better error handling

This commit is contained in:
Sander Roosendaal
2018-12-20 21:29:13 +01:00
parent ab9579a048
commit 98900059f8
6 changed files with 48 additions and 77 deletions

View File

@@ -29,6 +29,7 @@ import re
import cgi
from icalendar import Calendar, Event
import rowers.braintreestuff as braintreestuff
import rowers.payments as payments
from django.shortcuts import render
from django.template.loader import render_to_string
@@ -1074,6 +1075,10 @@ def paidplans_view(request):
def billing_view(request):
r = getrequestrower(request)
if payments.is_existing_customer(r):
url = reverse(upgrade_view)
return HttpResponseRedirect(url)
if request.method == 'POST':
billingaddressform = RowerBillingAddressForm(request.POST)
planselectform = PlanSelectForm(request.POST,paymentprocessor='braintree')