mirror of
https://github.com/lemeow125/DRF_Template.git
synced 2025-06-28 16:15:44 +08:00
Fixed email templates failing to load and updated README.md
This commit is contained in:
parent
8d40a33882
commit
fe59d3883a
4 changed files with 21 additions and 12 deletions
|
@ -135,10 +135,9 @@ def stripe_webhook_view(request):
|
|||
if event['type'] == 'customer.subscription.created':
|
||||
subscription = event['data']['object']
|
||||
# Get the Invoice object from the Subscription object
|
||||
invoice = stripe.Invoice.retrieve(subscription['latest_invoice'])[
|
||||
'data']['object']
|
||||
invoice = stripe.Invoice.retrieve(subscription['latest_invoice'])
|
||||
# Get the Charge object from the Invoice object
|
||||
charge = stripe.Charge.retrieve(invoice['charge'])['data']['object']
|
||||
charge = stripe.Charge.retrieve(invoice['charge'])
|
||||
|
||||
# Get paying user
|
||||
customer = stripe.Customer.retrieve(subscription["customer"])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue