Fix bug: rename subscription_id to stripe_subscription_id

This commit is contained in:
PCoder 2017-12-24 15:04:20 +01:00
parent eb067f5708
commit 89d70a2b6a

View file

@ -536,9 +536,9 @@ class MembershipDeactivateView(LoginRequiredMixin, UpdateView):
customer__user=self.request.user customer__user=self.request.user
).last() ).last()
if membership_order: if membership_order:
if membership_order.subscription_id: if membership_order.stripe_subscription_id:
result = stripe_utils.unsubscribe_customer( result = stripe_utils.unsubscribe_customer(
subscription_id=membership_order.subscription_id subscription_id=membership_order.stripe_subscription_id
) )
stripe_subscription_obj = result.get('response_object') stripe_subscription_obj = result.get('response_object')
# Check if the subscription was canceled # Check if the subscription was canceled