From d6ee806467d5b19478b1bf06528dc32b1566bcd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Floure?= Date: Thu, 5 Mar 2020 11:28:20 +0100 Subject: [PATCH] Fix error in stripe get_customer_id_for --- uncloud/uncloud_pay/stripe.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/uncloud/uncloud_pay/stripe.py b/uncloud/uncloud_pay/stripe.py index 7dc53c6..ab3eac2 100644 --- a/uncloud/uncloud_pay/stripe.py +++ b/uncloud/uncloud_pay/stripe.py @@ -75,9 +75,7 @@ def get_customer_id_for(user): try: customer = create_customer(user.username, user.email) uncloud_stripe_mapping = uncloud_pay.models.StripeCustomer.objects.create( - owner=user, - stripe_id=customer_request['response_object']['id'] - ) + owner=user, stripe_id=customer.id) return uncloud_stripe_mapping.stripe_id except Exception as e: return None