mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
stripe: Link InvoiceItem to Invoice.
This is required for upgrading to the basil version of stripe. Changes haven't been tested in this commit. It is just for easy verification of changes.
This commit is contained in:
@@ -3009,8 +3009,11 @@ class StripeTest(StripeTestCase):
|
||||
assert customer is not None
|
||||
stripe_customer_id = customer.stripe_customer_id
|
||||
assert stripe_customer_id is not None
|
||||
stripe.InvoiceItem.create(amount=5000, currency="usd", customer=stripe_customer_id)
|
||||
stripe_invoice = stripe.Invoice.create(customer=stripe_customer_id)
|
||||
assert stripe_invoice.id is not None
|
||||
stripe.InvoiceItem.create(
|
||||
invoice=stripe_invoice.id, amount=5000, currency="usd", customer=stripe_customer_id
|
||||
)
|
||||
stripe.Invoice.finalize_invoice(stripe_invoice)
|
||||
RealmAuditLog.objects.filter(event_type=AuditLogEventType.STRIPE_CARD_CHANGED).delete()
|
||||
|
||||
|
Reference in New Issue
Block a user