Fix issues on settings/card save/delete methods
This commit is contained in:
		
					parent
					
						
							
								31c5336e18
							
						
					
				
			
			
				commit
				
					
						7cd485bc6d
					
				
			
		
					 3 changed files with 13 additions and 30 deletions
				
			
		|  | @ -101,7 +101,9 @@ class StripeUtils(object): | |||
|         if card_id.startswith("pm"): | ||||
|             logger.debug("PaymentMethod %s detached %s" % (card_id, | ||||
|                                                            stripe_customer_id)) | ||||
|             customer.PaymentMethod.detach(card_id) | ||||
|             pm = stripe.PaymentMethod.retrieve(card_id) | ||||
|             stripe.PaymentMethod.detach(card_id) | ||||
|             pm.delete() | ||||
|         else: | ||||
|             logger.debug("card %s detached %s" % (card_id, stripe_customer_id)) | ||||
|             card = customer.sources.retrieve(card_id) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue