stripe: Set .api_version to make integration work again.

Upgrading stripe to 6.0.0 in e32366638a
breaks our Stripe integration due to API version change making us fail
to finalize creating an invoice and charge the customer.

For the upstream details see:
60ab6ac7d7/CHANGELOG.md (600---2023-08-16)

6.0.0 uses 2023-08-16 Stripe API version unless specified otherwise. We
want to use 2020-08-27.

Setting stripe.api_version in corporate/lib/stripe.py is sufficient for
it to be set everywhere else. This is supported by the fact that we also
only set stripe.api_key in that file.
This commit is contained in:
Mateusz Mandera
2023-10-10 22:52:17 +02:00
committed by Tim Abbott
parent 3498b07379
commit 4fc2b54eed

View File

@@ -55,6 +55,8 @@ DEFAULT_INVOICE_DAYS_UNTIL_DUE = 30
# The version of Stripe API the billing system supports.
STRIPE_API_VERSION = "2020-08-27"
stripe.api_version = STRIPE_API_VERSION
def get_latest_seat_count(realm: Realm) -> int:
return get_seat_count(realm, extra_non_guests_count=0, extra_guests_count=0)