Associate newly added card with customer from hosting

This commit is contained in:
M.Ravi 2017-10-26 12:29:16 +02:00
commit 8d2c120b43
2 changed files with 6 additions and 2 deletions

View file

@ -626,6 +626,10 @@ class SettingsView(LoginRequiredMixin, FormView):
exp_year=card_details_response['exp_year'],
card_id=card_details_response['card_id']
)
stripe_utils.associate_customer_card(
request.user.stripecustomer.stripe_id,
token
)
msg = _(
"Successfully associated the card with your account"
)