From 3a12308e857eb9d7d722d83568a8ea092a3b07ac 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