mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 04:48:53 +00:00
fix(server): minize checkout parameters (#9090)
This commit is contained in:
@@ -179,27 +179,19 @@ export class UserSubscriptionManager extends SubscriptionManager {
|
||||
};
|
||||
|
||||
return this.stripe.checkout.sessions.create({
|
||||
customer: customer.stripeCustomerId,
|
||||
line_items: [
|
||||
{
|
||||
price: price.price.id,
|
||||
quantity: 1,
|
||||
},
|
||||
],
|
||||
customer_update: {
|
||||
name: 'auto',
|
||||
},
|
||||
tax_id_collection: {
|
||||
enabled: true,
|
||||
},
|
||||
...discounts,
|
||||
...mode,
|
||||
...discounts,
|
||||
subscription_data: {
|
||||
...trials,
|
||||
},
|
||||
success_url: this.url.link(params.successCallbackLink, {
|
||||
session_id: '{CHECKOUT_SESSION_ID}',
|
||||
}),
|
||||
customer: customer.stripeCustomerId,
|
||||
success_url: this.url.link(params.successCallbackLink),
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -111,27 +111,21 @@ export class WorkspaceSubscriptionManager extends SubscriptionManager {
|
||||
});
|
||||
|
||||
return this.stripe.checkout.sessions.create({
|
||||
customer: customer.stripeCustomerId,
|
||||
line_items: [
|
||||
{
|
||||
price: price.price.id,
|
||||
quantity: count,
|
||||
},
|
||||
],
|
||||
customer_update: {
|
||||
name: 'auto',
|
||||
},
|
||||
tax_id_collection: {
|
||||
enabled: true,
|
||||
},
|
||||
...discounts,
|
||||
mode: 'subscription',
|
||||
success_url: this.url.link(params.successCallbackLink),
|
||||
customer: customer.stripeCustomerId,
|
||||
subscription_data: {
|
||||
metadata: {
|
||||
workspaceId: args.workspaceId,
|
||||
},
|
||||
},
|
||||
...discounts,
|
||||
success_url: this.url.link(params.successCallbackLink),
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user