Fix token bug in stripe payments

This commit is contained in:
Joseph Schorr 2013-11-15 15:31:05 -05:00
parent 457b619647
commit 04780cb3fa
3 changed files with 3 additions and 3 deletions

View file

@ -1249,7 +1249,7 @@ def subscribe(user, plan, token, accepted_plans):
if not user.stripe_id:
# Check if a non-paying user is trying to subscribe to a free plan
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
card = token
cus = stripe.Customer.create(email=user.email, plan=plan, card=card)

View file

@ -240,7 +240,7 @@ quayApp = angular.module('quay', ['restangular', 'angularMoment', 'angulartics',
if (callbacks['started']) {
callbacks['started']();
}
planService.setSubscription(orgname, planId, callbacks['success'], callbacks['failure']);
planService.setSubscription(orgname, planId, callbacks['success'], callbacks['failure'], token);
});
};

View file

@ -13,7 +13,7 @@ def renderInvoiceToHtml(invoice, user):
if not price:
return '$0'
return '$' + '{.2f}'.format(price / 100)
return '$' + '{0:.2f}'.format(float(price) / 100)
def get_range(line):
if line.period and line.period.start and line.period.end: