Fix token bug in stripe payments
This commit is contained in:
parent
457b619647
commit
04780cb3fa
3 changed files with 3 additions and 3 deletions
|
@ -1249,7 +1249,7 @@ def subscribe(user, plan, token, accepted_plans):
|
||||||
if not user.stripe_id:
|
if not user.stripe_id:
|
||||||
# Check if a non-paying user is trying to subscribe to a free plan
|
# Check if a non-paying user is trying to subscribe to a free plan
|
||||||
if not plan_found['price'] == 0:
|
if not plan_found['price'] == 0:
|
||||||
# They want a real paying plan, create the customerand plan
|
# They want a real paying plan, create the customer and plan
|
||||||
# simultaneously
|
# simultaneously
|
||||||
card = token
|
card = token
|
||||||
cus = stripe.Customer.create(email=user.email, plan=plan, card=card)
|
cus = stripe.Customer.create(email=user.email, plan=plan, card=card)
|
||||||
|
|
|
@ -240,7 +240,7 @@ quayApp = angular.module('quay', ['restangular', 'angularMoment', 'angulartics',
|
||||||
if (callbacks['started']) {
|
if (callbacks['started']) {
|
||||||
callbacks['started']();
|
callbacks['started']();
|
||||||
}
|
}
|
||||||
planService.setSubscription(orgname, planId, callbacks['success'], callbacks['failure']);
|
planService.setSubscription(orgname, planId, callbacks['success'], callbacks['failure'], token);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ def renderInvoiceToHtml(invoice, user):
|
||||||
if not price:
|
if not price:
|
||||||
return '$0'
|
return '$0'
|
||||||
|
|
||||||
return '$' + '{.2f}'.format(price / 100)
|
return '$' + '{0:.2f}'.format(float(price) / 100)
|
||||||
|
|
||||||
def get_range(line):
|
def get_range(line):
|
||||||
if line.period and line.period.start and line.period.end:
|
if line.period and line.period.start and line.period.end:
|
||||||
|
|
Reference in a new issue