Add add_card_to_stripe_customer function

This commit is contained in:
M.Ravi 2017-10-15 23:32:16 +02:00
parent 83363f4701
commit a3ce43fd53
1 changed files with 4 additions and 0 deletions

View File

@ -78,6 +78,10 @@ class StripeUtils(object):
customer.source = token
customer.save()
def add_card_to_stripe_customer(self, stripe_customer_id, token):
customer = stripe.Customer.retrieve(stripe_customer_id)
self.update_customer_token(customer, token)
@handleStripeError
def update_customer_card(self, customer_id, token):
customer = stripe.Customer.retrieve(customer_id)