This commit is contained in:
		
					parent
					
						
							
								b8be9f3915
							
						
					
				
			
			
				commit
				
					
						6eb5565537
					
				
			
		
					 2 changed files with 13 additions and 6 deletions
				
			
		| 
						 | 
				
			
			@ -143,12 +143,15 @@ class StripeCustomer(models.Model):
 | 
			
		|||
 | 
			
		||||
            stripe_utils = StripeUtils()
 | 
			
		||||
            stripe_data = stripe_utils.create_customer(token, email)
 | 
			
		||||
            stripe_cus_id = stripe_data.get('response_object').get('id')
 | 
			
		||||
            if stripe_data.get('response_object'):
 | 
			
		||||
                stripe_cus_id = stripe_data.get('response_object').get('id')
 | 
			
		||||
 | 
			
		||||
            stripe_customer = StripeCustomer.objects.\
 | 
			
		||||
                create(user=user, stripe_id=stripe_cus_id)
 | 
			
		||||
                stripe_customer = StripeCustomer.objects.\
 | 
			
		||||
                    create(user=user, stripe_id=stripe_cus_id)
 | 
			
		||||
 | 
			
		||||
            return stripe_customer
 | 
			
		||||
                return stripe_customer
 | 
			
		||||
            else:
 | 
			
		||||
                return None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class CreditCards(models.Model):
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue