commit
				
					
						211e1be0fb
					
				
			
		
					 3 changed files with 5 additions and 2 deletions
				
			
		| 
						 | 
					@ -439,7 +439,6 @@ class PaymentVMView(LoginRequiredMixin, FormView):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def post(self, request, *args, **kwargs):
 | 
					    def post(self, request, *args, **kwargs):
 | 
				
			||||||
        form = self.get_form()
 | 
					        form = self.get_form()
 | 
				
			||||||
 | 
					 | 
				
			||||||
        if form.is_valid():
 | 
					        if form.is_valid():
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            # Get billing address data
 | 
					            # Get billing address data
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -9,6 +9,9 @@ class StripePayment(object):
 | 
				
			||||||
    @classmethod
 | 
					    @classmethod
 | 
				
			||||||
    def make_payment(cls,user,amount,token,time):
 | 
					    def make_payment(cls,user,amount,token,time):
 | 
				
			||||||
        try:
 | 
					        try:
 | 
				
			||||||
 | 
					            print(amount)
 | 
				
			||||||
 | 
					            print(amount)
 | 
				
			||||||
 | 
					            print(amount)
 | 
				
			||||||
            # Use Stripe's library to make requests...
 | 
					            # Use Stripe's library to make requests...
 | 
				
			||||||
            charge = stripe.Charge.create(
 | 
					            charge = stripe.Charge.create(
 | 
				
			||||||
                amount=amount,
 | 
					                amount=amount,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -107,7 +107,8 @@ class StripeUtils(object):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @handleStripeError
 | 
					    @handleStripeError
 | 
				
			||||||
    def make_charge(self, amount=None, customer=None):
 | 
					    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(
 | 
					        charge = self.stripe.Charge.create(
 | 
				
			||||||
            amount=amount,  # in cents
 | 
					            amount=amount,  # in cents
 | 
				
			||||||
            currency=self.CURRENCY,
 | 
					            currency=self.CURRENCY,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue