fixed vm pricing error

This commit is contained in:
Levi 2017-05-25 13:04:29 -05:00
parent 4daf6ac3ac
commit 9a93a3e315
3 changed files with 6 additions and 2 deletions

View file

@ -419,7 +419,7 @@ class PaymentVMView(LoginRequiredMixin, FormView):
def post(self, request, *args, **kwargs):
form = self.get_form()
import pdb;pdb.set_trace()
if form.is_valid():
# Get billing address data

View file

@ -9,6 +9,9 @@ class StripePayment(object):
@classmethod
def make_payment(cls,user,amount,token,time):
try:
print(amount)
print(amount)
print(amount)
# Use Stripe's library to make requests...
charge = stripe.Charge.create(
amount=amount,

View file

@ -107,7 +107,8 @@ class StripeUtils(object):
@handleStripeError
def make_charge(self, amount=None, customer=None):
amount = int(amount * 100) # stripe amount unit, in cents
_amount = float(amount)
amount = int(_amount * 100) # stripe amount unit, in cents
charge = self.stripe.Charge.create(
amount=amount, # in cents
currency=self.CURRENCY,