Disable dissociating card on subscription failure
This commit is contained in:
		
					parent
					
						
							
								e9ac699be8
							
						
					
				
			
			
				commit
				
					
						8d7b01d7e2
					
				
			
		
					 1 changed files with 7 additions and 0 deletions
				
			
		|  | @ -530,6 +530,13 @@ class OrderConfirmationView(DetailView): | ||||||
|         # Check if the subscription was approved and is active |         # Check if the subscription was approved and is active | ||||||
|         if (stripe_subscription_obj is None |         if (stripe_subscription_obj is None | ||||||
|                 or stripe_subscription_obj.status != 'active'): |                 or stripe_subscription_obj.status != 'active'): | ||||||
|  |             # At this point, we have created a Stripe API card and | ||||||
|  |             # associated it with the customer; but the transaction failed | ||||||
|  |             # due to some reason. | ||||||
|  |             # stripe_utils.dissociate_customer_card( | ||||||
|  |             #     stripe_api_cus_id, | ||||||
|  |             #     card_details_dict['card_id'] | ||||||
|  |             # ) | ||||||
|             msg = subscription_result.get('error') |             msg = subscription_result.get('error') | ||||||
|             messages.add_message(self.request, messages.ERROR, msg, |             messages.add_message(self.request, messages.ERROR, msg, | ||||||
|                                  extra_tags='failed_payment') |                                  extra_tags='failed_payment') | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue