small changes
This commit is contained in:
@@ -26,7 +26,7 @@ import pandas as pd
|
|||||||
from rowsandall_app.settings import (
|
from rowsandall_app.settings import (
|
||||||
BRAINTREE_MERCHANT_ID,BRAINTREE_PUBLIC_KEY,BRAINTREE_PRIVATE_KEY,
|
BRAINTREE_MERCHANT_ID,BRAINTREE_PUBLIC_KEY,BRAINTREE_PRIVATE_KEY,
|
||||||
BRAINTREE_SANDBOX_MERCHANT_ID,BRAINTREE_SANDBOX_PUBLIC_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:
|
if settings.DEBUG or 'dev' in settings.SITE_URL:
|
||||||
@@ -264,7 +264,8 @@ def create_subscription(rower,data):
|
|||||||
|
|
||||||
result = gateway.subscription.create({
|
result = gateway.subscription.create({
|
||||||
"payment_method_token": payment_method_token,
|
"payment_method_token": payment_method_token,
|
||||||
"plan_id": plan.external_id
|
"plan_id": plan.external_id,
|
||||||
|
"merchant_account_id": BRAINTREE_MERCHANT_ACCOUNT_ID,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -95,7 +95,7 @@
|
|||||||
</section>
|
</section>
|
||||||
<div id="paymenterror2"> </div>
|
<div id="paymenterror2"> </div>
|
||||||
<input type="hidden" id="nonce" name="payment_method_nonce" />
|
<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 }}">
|
<input type="hidden" id="plan" name="plan" value="{{ plan.id }}">
|
||||||
<p>
|
<p>
|
||||||
<input id="tac" type="checkbox" name="tac" value="tac">I have taken note of the
|
<input id="tac" type="checkbox" name="tac" value="tac">I have taken note of the
|
||||||
|
|||||||
@@ -390,7 +390,6 @@ def upgrade_checkouts_view(request):
|
|||||||
url = reverse('billing_view')
|
url = reverse('billing_view')
|
||||||
return HttpResponseRedirect(url)
|
return HttpResponseRedirect(url)
|
||||||
else:
|
else:
|
||||||
print('noot',form)
|
|
||||||
messages.error(request,"There was an error in the payment form")
|
messages.error(request,"There was an error in the payment form")
|
||||||
url = reverse(upgrade_view)
|
url = reverse(upgrade_view)
|
||||||
return HttpResponseRedirect(url)
|
return HttpResponseRedirect(url)
|
||||||
|
|||||||
@@ -447,6 +447,11 @@ try:
|
|||||||
except KeyError:
|
except KeyError:
|
||||||
BRAINTREE_MERCHANT_ID = ''
|
BRAINTREE_MERCHANT_ID = ''
|
||||||
|
|
||||||
|
try:
|
||||||
|
BRAINTREE_MERCHANT_ACCOUNT_ID = CFG['braintree_merchant_account_id']
|
||||||
|
except KeyError:
|
||||||
|
BRAINTREE_MERCHANT_ACCOUNT_ID = 'rowsandallEUR'
|
||||||
|
|
||||||
try:
|
try:
|
||||||
BRAINTREE_PUBLIC_KEY = CFG['braintree_public_key']
|
BRAINTREE_PUBLIC_KEY = CFG['braintree_public_key']
|
||||||
except KeyError:
|
except KeyError:
|
||||||
|
|||||||
Reference in New Issue
Block a user