Bugfix/payment options (#5805)
* removed locale to use automatic detection in teams/lib/payments.ts * removed payment_method_types to manage payment methods in the Dashboard * added customer_update and automatic_tax to apply tax rates to payments * added allow_promotion_codes to allow promotion codes * removed multiple usages of `allow_promotion_codes` in payments.ts Co-authored-by: René Müller <rene.mueller@clicksports.de> Co-authored-by: Peer Richelsen <peeroke@gmail.com> Co-authored-by: alannnc <alannnc@gmail.com>pull/5882/head^2
parent
c38588b93d
commit
bcfd57c953
|
@ -31,7 +31,6 @@ export const purchaseTeamSubscription = async (input: { teamId: number; seats: n
|
||||||
allow_promotion_codes: true,
|
allow_promotion_codes: true,
|
||||||
success_url: `${WEBAPP_URL}/api/teams/${teamId}/upgrade?session_id={CHECKOUT_SESSION_ID}`,
|
success_url: `${WEBAPP_URL}/api/teams/${teamId}/upgrade?session_id={CHECKOUT_SESSION_ID}`,
|
||||||
cancel_url: `${WEBAPP_URL}/settings/profile`,
|
cancel_url: `${WEBAPP_URL}/settings/profile`,
|
||||||
locale: "en",
|
|
||||||
line_items: [
|
line_items: [
|
||||||
{
|
{
|
||||||
/** We only need to set the base price and we can upsell it directly on Stripe's checkout */
|
/** We only need to set the base price and we can upsell it directly on Stripe's checkout */
|
||||||
|
@ -39,10 +38,15 @@ export const purchaseTeamSubscription = async (input: { teamId: number; seats: n
|
||||||
quantity: seats,
|
quantity: seats,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
customer_update: {
|
||||||
|
address: "auto",
|
||||||
|
},
|
||||||
|
automatic_tax: {
|
||||||
|
enabled: true,
|
||||||
|
},
|
||||||
metadata: {
|
metadata: {
|
||||||
teamId,
|
teamId,
|
||||||
},
|
},
|
||||||
payment_method_types: ["card"],
|
|
||||||
subscription_data: {
|
subscription_data: {
|
||||||
metadata: {
|
metadata: {
|
||||||
teamId,
|
teamId,
|
||||||
|
|
Loading…
Reference in New Issue