Added name parameter for creating StripeCustomer and set description to this
This commit is contained in:
parent
3b1cd200d6
commit
3be7fbe2ee
2 changed files with 7 additions and 7 deletions
|
|
@ -173,7 +173,6 @@ class StripeCustomer(models.Model):
|
|||
Check if there is a registered stripe customer with that email
|
||||
or create a new one
|
||||
"""
|
||||
stripe_customer = None
|
||||
try:
|
||||
stripe_utils = StripeUtils()
|
||||
stripe_customer = cls.objects.get(user__email=email)
|
||||
|
|
@ -189,7 +188,7 @@ class StripeCustomer(models.Model):
|
|||
user = CustomUser.objects.get(email=email)
|
||||
|
||||
stripe_utils = StripeUtils()
|
||||
stripe_data = stripe_utils.create_customer(token, email)
|
||||
stripe_data = stripe_utils.create_customer(token, email, user.name)
|
||||
if stripe_data.get('response_object'):
|
||||
stripe_cus_id = stripe_data.get('response_object').get('id')
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue