From 9a93a3e315edf775a60796cb0b383e9a75b8d259 Mon Sep 17 00:00:00 2001
From: Levi <levinoelvm@gmail.com>
Date: Thu, 25 May 2017 13:04:29 -0500
Subject: [PATCH] fixed vm pricing error

---
 hosting/views.py      | 2 +-
 membership/payment.py | 3 +++
 utils/stripe_utils.py | 3 ++-
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/hosting/views.py b/hosting/views.py
index 3999037b..7b82e503 100644
--- a/hosting/views.py
+++ b/hosting/views.py
@@ -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
diff --git a/membership/payment.py b/membership/payment.py
index d8aad6d5..08245d8e 100644
--- a/membership/payment.py
+++ b/membership/payment.py
@@ -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,
diff --git a/utils/stripe_utils.py b/utils/stripe_utils.py
index 679a8b58..8f017fbd 100644
--- a/utils/stripe_utils.py
+++ b/utils/stripe_utils.py
@@ -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,