Connecting users to Stripe customers by email
Note this line from permissions.py
:
user_customer = Customer.objects.filter(email=user.email)[0]
This relies implicitly on the Stripe customer using the same email for their account in a Django application. This isn't a safe assumption to make. Also, multiple Stripe customers can use the same email in theory
Since Stripe doesn't support the use of a WebID, I'm wondering the best way to link the two together. Customers have a unique ID in Stripe, which we can perhaps access during the payment process