From c4bf4fc6ffc5bc189e6d1443b45c97971d3163bd Mon Sep 17 00:00:00 2001 From: Levi Date: Sat, 30 Apr 2016 14:29:16 -0500 Subject: [PATCH] Fixed error creating stripe customer --- membership/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/membership/models.py b/membership/models.py index 0c23f572..fb25acdc 100644 --- a/membership/models.py +++ b/membership/models.py @@ -141,9 +141,10 @@ class StripeCustomer(models.Model): stripe_utils = StripeUtils() stripe_data = stripe_utils.create_customer(token, email) + stripe_cus_id = stripe_data.get('response_object').get('id') stripe_customer = StripeCustomer.objects.\ - create(user=user, stripe_id=stripe_data.get('id')) + create(user=user, stripe_id=stripe_cus_id) return stripe_customer