Private
Public Access
1
0

testing refund acknowledgement

This commit is contained in:
Sander Roosendaal
2019-02-08 13:01:19 +01:00
parent 319ce56e07
commit fa9632afb1
7 changed files with 19 additions and 15 deletions

View File

@@ -304,15 +304,16 @@ def getmaxwattinterval(tt,ww,i):
if len(w_roll): if len(w_roll):
# now goes with # data points - should be fixed seconds # now goes with # data points - should be fixed seconds
indexmax = w_roll.idxmax(axis=1) indexmax = w_roll.idxmax(axis=1)
indexmaxpos = indexmax.get_loc(indexmax) # indexmaxpos = indexmax.get_loc(indexmax)
indexmaxpos = indexmax
try: try:
t_0 = tt.iloc[indexmaxpos] t_0 = tt.ix[indexmaxpos]
t_1 = tt.iloc[indexmaxpos-i] t_1 = tt.ix[indexmaxpos-i]
deltas = tt.iloc[indexmaxpos-i:indexmaxpos].diff().dropna() deltas = tt.ix[indexmaxpos-i:indexmaxpos].diff().dropna()
testres = 1.0e-3*deltas.max() < 30. testres = 1.0e-3*deltas.max() < 30.
if testres: if testres:
deltat = 1.0e-3*(t_0-t_1) deltat = 1.0e-3*(t_0-t_1)
wmax = w_roll.iloc[indexmaxpos] wmax = w_roll.ix[indexmaxpos]
#if wmax > 800 or wmax*5.0e-4*deltat > 800.0: #if wmax > 800 or wmax*5.0e-4*deltat > 800.0:
# wmax = 0 # wmax = 0
else: else:

View File

@@ -24,7 +24,8 @@
as a price per year. You can downgrade or cancel your as a price per year. You can downgrade or cancel your
plan at any time, through the <a href="/rowers/me/edit/">settings page</a>. plan at any time, through the <a href="/rowers/me/edit/">settings page</a>.
Please refer to our <a href="/rowers/legal/">terms and conditions</a> for our Please refer to our <a href="/rowers/legal/">terms and conditions</a> for our
payments and refunds policy. Accepted payment methods are the payment methods offered <a href="/rowers/legel/#refunds">payments and refunds policy</a>.
Accepted payment methods are the payment methods offered
by by
<a href="https://www.braintreegateway.com/merchants/jytq7yxsm66qqdzb/verified">Braintree</a> <a href="https://www.braintreegateway.com/merchants/jytq7yxsm66qqdzb/verified">Braintree</a>
through us. If you have any questions about our payments and refunds policy, please contact through us. If you have any questions about our payments and refunds policy, please contact

View File

@@ -20,7 +20,7 @@
</p> </p>
<p> <p>
Payments will be procesed by Braintree (A PayPal service): Payments will be processed by Braintree (A PayPal service):
</p> </p>
<p> <p>
<a href="https://www.braintreegateway.com/merchants/{{ BRAINTREE_MERCHANT_ID }}/verified" target="_blank"> <a href="https://www.braintreegateway.com/merchants/{{ BRAINTREE_MERCHANT_ID }}/verified" target="_blank">

View File

@@ -20,7 +20,7 @@
</p> </p>
<p> <p>
Payments will be procesed by Braintree (A PayPal service): Payments will be processed by Braintree (A PayPal service):
</p> </p>
<p> <p>
<a href="https://www.braintreegateway.com/merchants/{{ BRAINTREE_MERCHANT_ID }}/verified" target="_blank"> <a href="https://www.braintreegateway.com/merchants/{{ BRAINTREE_MERCHANT_ID }}/verified" target="_blank">

View File

@@ -501,6 +501,8 @@ class PaymentTest(TestCase):
'payment_method_nonce': 'aap', 'payment_method_nonce': 'aap',
} }
form = BillingForm(form_data)
self.assertTrue(not form.is_valid())
login = self.c.login(username=u.username, password=self.password) login = self.c.login(username=u.username, password=self.password)
self.assertTrue(login) self.assertTrue(login)
@@ -511,7 +513,7 @@ class PaymentTest(TestCase):
self.assertEqual(response.status_code,200) self.assertEqual(response.status_code,200)
self.assertRedirects(response, self.assertRedirects(response,
expected_url = '/rowers/checkout/{planid}'.format( expected_url = '/rowers/checkout/{planid}/'.format(
planid=plans[1].id), planid=plans[1].id),
status_code=302,target_status_code=200) status_code=302,target_status_code=200)
@@ -546,7 +548,7 @@ class PaymentTest(TestCase):
} }
form = BillingForm(form_data) form = BillingForm(form_data)
self.assertTrue(form.is_valid()) self.assertTrue(not form.is_valid())
login = self.c.login(username=u.username, password=self.password) login = self.c.login(username=u.username, password=self.password)
self.assertTrue(login) self.assertTrue(login)
@@ -557,7 +559,7 @@ class PaymentTest(TestCase):
self.assertEqual(response.status_code,200) self.assertEqual(response.status_code,200)
self.assertRedirects(response, self.assertRedirects(response,
expected_url = '/rowers/upgradecheckout/{planid}'.format( expected_url = '/rowers/upgradecheckout/{planid}/'.format(
planid=plans[1].id), planid=plans[1].id),
status_code=302,target_status_code=200) status_code=302,target_status_code=200)
@@ -591,7 +593,7 @@ class PaymentTest(TestCase):
} }
form = BillingForm(form_data) form = BillingForm(form_data)
self.assertTrue(form.is_valid()) self.assertTrue(not form.is_valid())
login = self.c.login(username=u.username, password=self.password) login = self.c.login(username=u.username, password=self.password)
self.assertTrue(login) self.assertTrue(login)
@@ -602,7 +604,7 @@ class PaymentTest(TestCase):
self.assertEqual(response.status_code,200) self.assertEqual(response.status_code,200)
self.assertRedirects(response, self.assertRedirects(response,
expected_url = '/rowers/downgradecheckout/{planid}'.format( expected_url = '/rowers/downgradecheckout/{planid}/'.format(
planid=plans[1].id), planid=plans[1].id),
status_code=302,target_status_code=200) status_code=302,target_status_code=200)

Binary file not shown.

View File

@@ -332,7 +332,7 @@ def checkouts_view(request):
elif 'tac' not in request.POST: elif 'tac' not in request.POST:
try: try:
planid = int(request.POST['plan']) planid = int(request.POST['plan'])
url = reverse('downgrade_confirm_view',kwargs={'planid':planid}) url = reverse('payment_confirm_view',kwargs={'planid':planid})
messages.error(request,"You must review and acknowledge the terms and conditions") messages.error(request,"You must review and acknowledge the terms and conditions")
return HttpResponseRedirect(url) return HttpResponseRedirect(url)
except IndexError: except IndexError:
@@ -421,7 +421,7 @@ def downgrade_checkouts_view(request):
elif 'tac' not in request.POST: elif 'tac' not in request.POST:
try: try:
planid = int(request.POST['plan']) planid = int(request.POST['plan'])
url = reverse('payment_confirm_view',kwargs={'planid':planid}) url = reverse('downgrade_confirm_view',kwargs={'planid':planid})
messages.error(request,"You must review and acknowledge the terms and conditions") messages.error(request,"You must review and acknowledge the terms and conditions")
return HttpResponseRedirect(url) return HttpResponseRedirect(url)
except IndexError: except IndexError: