Set preferred for the card that's used for a subscription
This commit is contained in:
parent
6212c9df50
commit
b6d1e8df6b
1 changed files with 3 additions and 3 deletions
|
@ -911,10 +911,10 @@ class OrdersHostingDetailView(LoginRequiredMixin,
|
||||||
' the payment page.')
|
' the payment page.')
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
return HttpResponse(json.dumps(response),
|
return HttpResponse(
|
||||||
content_type="application/json")
|
json.dumps(response), content_type="application/json"
|
||||||
|
)
|
||||||
if 'token' in request.session:
|
if 'token' in request.session:
|
||||||
card_details_response['preferred']=True
|
|
||||||
UserCardDetail.get_or_create_user_card_detail(
|
UserCardDetail.get_or_create_user_card_detail(
|
||||||
stripe_customer=self.request.user.stripecustomer,
|
stripe_customer=self.request.user.stripecustomer,
|
||||||
card_details=card_details_response
|
card_details=card_details_response
|
||||||
|
|
Loading…
Reference in a new issue