Call delete on Customer object
This commit is contained in:
		
					parent
					
						
							
								a67284a89d
							
						
					
				
			
			
				commit
				
					
						0352096fa7
					
				
			
		
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -67,10 +67,10 @@ class Command(BaseCommand):
 | 
			
		|||
                                     "not exist".format(email))
 | 
			
		||||
                        sys.exit(1)
 | 
			
		||||
                    stripe_customer = cus_user.stripecustomer
 | 
			
		||||
                    del_response = stripe.Customer.delete(
 | 
			
		||||
                    c = stripe.Customer.retrieve(
 | 
			
		||||
                        stripe_customer.stripe_id
 | 
			
		||||
                    )
 | 
			
		||||
                    if del_response.deleted:
 | 
			
		||||
                    if c.delete():
 | 
			
		||||
                        logger.debug(
 | 
			
		||||
                            "StripeCustomer {} associated with {} deleted"
 | 
			
		||||
                            "".format(stripe_customer.stripe_id, email)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue