Private
Public Access
1
0

small changes

This commit is contained in:
Sander Roosendaal
2019-08-09 15:12:26 +02:00
parent 13ad9f5012
commit ac441534a3
4 changed files with 9 additions and 4 deletions

View File

@@ -26,7 +26,7 @@ import pandas as pd
from rowsandall_app.settings import (
BRAINTREE_MERCHANT_ID,BRAINTREE_PUBLIC_KEY,BRAINTREE_PRIVATE_KEY,
BRAINTREE_SANDBOX_MERCHANT_ID,BRAINTREE_SANDBOX_PUBLIC_KEY,
BRAINTREE_SANDBOX_PRIVATE_KEY
BRAINTREE_SANDBOX_PRIVATE_KEY, BRAINTREE_MERCHANT_ACCOUNT_ID
)
if settings.DEBUG or 'dev' in settings.SITE_URL:
@@ -264,7 +264,8 @@ def create_subscription(rower,data):
result = gateway.subscription.create({
"payment_method_token": payment_method_token,
"plan_id": plan.external_id
"plan_id": plan.external_id,
"merchant_account_id": BRAINTREE_MERCHANT_ACCOUNT_ID,
})

View File

@@ -95,7 +95,7 @@
</section>
<div id="paymenterror2"> </div>
<input type="hidden" id="nonce" name="payment_method_nonce" />
<input type="hidden" id="paymenttype" name="payment_type" />
<input type="hidden" id="paymenttype" name="paymenttype" />
<input type="hidden" id="plan" name="plan" value="{{ plan.id }}">
<p>
<input id="tac" type="checkbox" name="tac" value="tac">I have taken note of the

View File

@@ -390,7 +390,6 @@ def upgrade_checkouts_view(request):
url = reverse('billing_view')
return HttpResponseRedirect(url)
else:
print('noot',form)
messages.error(request,"There was an error in the payment form")
url = reverse(upgrade_view)
return HttpResponseRedirect(url)

View File

@@ -447,6 +447,11 @@ try:
except KeyError:
BRAINTREE_MERCHANT_ID = ''
try:
BRAINTREE_MERCHANT_ACCOUNT_ID = CFG['braintree_merchant_account_id']
except KeyError:
BRAINTREE_MERCHANT_ACCOUNT_ID = 'rowsandallEUR'
try:
BRAINTREE_PUBLIC_KEY = CFG['braintree_public_key']
except KeyError: