adding braintree info
This commit is contained in:
@@ -1063,6 +1063,8 @@ def add_defaultfavorites(r):
|
||||
def paidplans_view(request):
|
||||
if not request.user.is_anonymous():
|
||||
r = getrequestrower(request)
|
||||
if r.paymentprocessor != 'braintree' and r.paymenttype == 'recurring':
|
||||
messages.error(request,'Automated payment processing is currently only available through BrainTree (by PayPal). You are currently on a recurring payment plan with PayPal. Contact the site administrator at support@rowsandall.com before you proceed')
|
||||
else:
|
||||
r = None
|
||||
|
||||
@@ -1080,6 +1082,9 @@ def billing_view(request):
|
||||
|
||||
r = getrequestrower(request)
|
||||
|
||||
if r.paymentprocessor != 'braintree' and r.paymenttype == 'recurring':
|
||||
messages.error(request,'Automated payment processing is currently only available through BrainTree (by PayPal). You are currently on a recurring payment plan with PayPal. Contact the site administrator at support@rowsandall.com before you proceed')
|
||||
|
||||
if payments.is_existing_customer(r):
|
||||
url = reverse(upgrade_view)
|
||||
return HttpResponseRedirect(url)
|
||||
@@ -1127,6 +1132,9 @@ def upgrade_view(request):
|
||||
|
||||
r = getrequestrower(request)
|
||||
|
||||
if r.paymentprocessor != 'braintree' and r.paymenttype == 'recurring':
|
||||
messages.error(request,'Automated payment processing is currently only available through BrainTree (by PayPal). You are currently on a recurring payment plan with PayPal. Contact the site administrator at support@rowsandall.com before you proceed')
|
||||
|
||||
if r.subscription_id is None or r.subscription_id == '':
|
||||
url = reverse(billing_view)
|
||||
return HttpResponseRedirect(url)
|
||||
@@ -1169,6 +1177,9 @@ def downgrade_view(request):
|
||||
|
||||
r = getrequestrower(request)
|
||||
|
||||
if r.paymentprocessor != 'braintree' and r.paymenttype == 'recurring':
|
||||
messages.error(request,'Automated payment processing is currently only available through BrainTree (by PayPal). You are currently on a recurring payment plan with PayPal. Contact the site administrator at support@rowsandall.com before you proceed')
|
||||
|
||||
if r.subscription_id is None or r.subscription_id == '':
|
||||
url = reverse(billing_view)
|
||||
return HttpResponseRedirect(url)
|
||||
@@ -1223,6 +1234,9 @@ def plan_stop_view(request):
|
||||
|
||||
subscriptions = []
|
||||
|
||||
if r.paymentprocessor != 'braintree' and r.paymenttype == 'recurring':
|
||||
messages.error(request,'Automated payment processing is currently only available through BrainTree (by PayPal). You are currently on a recurring payment plan with PayPal. Contact the site administrator at support@rowsandall.com before you proceed')
|
||||
|
||||
if r.paidplan is not None and r.paidplan.paymentprocessor == 'braintree':
|
||||
try:
|
||||
subscriptions = braintreestuff.find_subscriptions(r)
|
||||
@@ -1275,6 +1289,9 @@ def upgrade_confirm_view(request,planid = 0):
|
||||
|
||||
r = getrequestrower(request)
|
||||
|
||||
if r.paymentprocessor != 'braintree' and r.paymenttype == 'recurring':
|
||||
messages.error(request,'Automated payment processing is currently only available through BrainTree (by PayPal). You are currently on a recurring payment plan with PayPal. Contact the site administrator at support@rowsandall.com before you proceed')
|
||||
|
||||
client_token = braintreestuff.get_client_token(r)
|
||||
|
||||
return render(request,
|
||||
@@ -1326,6 +1343,9 @@ def payment_confirm_view(request,planid = 0):
|
||||
|
||||
r = getrequestrower(request)
|
||||
|
||||
if r.paymentprocessor != 'braintree' and r.paymenttype == 'recurring':
|
||||
messages.error(request,'Automated payment processing is currently only available through BrainTree (by PayPal). You are currently on a recurring payment plan with PayPal. Contact the site administrator at support@rowsandall.com before you proceed')
|
||||
|
||||
client_token = braintreestuff.get_client_token(r)
|
||||
|
||||
return render(request,
|
||||
@@ -1342,10 +1362,13 @@ def checkouts_view(request):
|
||||
if not PAYMENT_PROCESSING_ON:
|
||||
url = reverse('promembership')
|
||||
return HttpResponseRedirect(url)
|
||||
|
||||
|
||||
|
||||
r = getrequestrower(request)
|
||||
|
||||
if r.paymentprocessor != 'braintree' and r.paymenttype == 'recurring':
|
||||
messages.error(request,'Automated payment processing is currently only available through BrainTree (by PayPal). You are currently on a recurring payment plan with PayPal. Contact the site administrator at support@rowsandall.com before you proceed')
|
||||
|
||||
if request.method != 'POST':
|
||||
url = reverse(paidplans_view)
|
||||
return HttpResponseRedirect(url)
|
||||
|
||||
Reference in New Issue
Block a user