Irreproducible bug fixing attempt

master
Alice 5 years ago
parent f12966a62d
commit a0dac8d1e5

@ -211,7 +211,10 @@ class StripeBackend(BackendBase):
payment.paid_amount = payment.amount
payment.backend_extid = invoice['id']
if invoice['subscription']:
payment.backend_sub_id = invoice['subscription']['id']
if isinstance(invoice['subscription'], str):
payment.backend_sub_id = invoice['subscription']
else:
payment.backend_sub_id = invoice['subscription']['id']
payment.backend_data = {'event_id': event['id']}
payment.save()

Loading…
Cancel
Save