mirror of https://github.com/zulip/zulip.git
stripe: Add billing address collection to checkout session.
This will require customers to include an address when setting up, or updating, the credit card information for their account. The billing address for the card will also be saved as the billing address for the stripe customer object. The customer object billing address appears on the invoices that are generated by stripe.
This commit is contained in:
parent
f71337aaf7
commit
cbb6d962d5
|
@ -1083,6 +1083,8 @@ class BillingSession(ABC):
|
|||
mode="setup",
|
||||
payment_method_types=["card"],
|
||||
success_url=f"{self.billing_session_url}/billing/event_status/?stripe_session_id={{CHECKOUT_SESSION_ID}}",
|
||||
billing_address_collection="required",
|
||||
customer_update={"address": "auto"},
|
||||
)
|
||||
Session.objects.create(
|
||||
stripe_session_id=stripe_session.id,
|
||||
|
@ -1107,6 +1109,8 @@ class BillingSession(ABC):
|
|||
mode="setup",
|
||||
payment_method_types=["card"],
|
||||
success_url=f"{self.billing_session_url}/billing/event_status/?stripe_session_id={{CHECKOUT_SESSION_ID}}",
|
||||
billing_address_collection="required",
|
||||
customer_update={"address": "auto"},
|
||||
)
|
||||
Session.objects.create(
|
||||
stripe_session_id=stripe_session.id,
|
||||
|
|
Loading…
Reference in New Issue