diff --git a/rowers/context_processors.py b/rowers/context_processors.py new file mode 100644 index 00000000..9aa44d1d --- /dev/null +++ b/rowers/context_processors.py @@ -0,0 +1,6 @@ +from django.conf import settings # import the settings file + +def braintree_merchant(request): + # return the value you want as a dictionnary. you may add multiple values in there. + # return {'BRAINTREE_MERCHANT_ID': settings.BRAINTREE_MERCHANT_ID} + return {'BRAINTREE_MERCHANT_ID': 'jytq7yxsm66qqdzb' } diff --git a/rowers/payments.py b/rowers/payments.py index 7e71aad5..503d6f4b 100644 --- a/rowers/payments.py +++ b/rowers/payments.py @@ -34,7 +34,10 @@ def setrowerplans(): def is_existing_customer(rower): if rower.country is not None and rower.customer_id is not None and rower.country != '': - return True + if rower.subscription_id is None or rower.subscription_id == '': + return False + else: + return True return False diff --git a/rowers/templates/downgrade.html b/rowers/templates/downgrade.html index 091b0dfe..bf2e7bc7 100644 --- a/rowers/templates/downgrade.html +++ b/rowers/templates/downgrade.html @@ -5,6 +5,15 @@

Downgrade

+

+ Transactions will be procesed by Braintree (A PayPal service): +

+

+ + + +

+