mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-09-23 20:18:42 +08: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({
|
return this.stripe.checkout.sessions.create({
|
||||||
|
customer: customer.stripeCustomerId,
|
||||||
line_items: [
|
line_items: [
|
||||||
{
|
{
|
||||||
price: price.price.id,
|
price: price.price.id,
|
||||||
quantity: 1,
|
quantity: 1,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
customer_update: {
|
|
||||||
name: 'auto',
|
|
||||||
},
|
|
||||||
tax_id_collection: {
|
|
||||||
enabled: true,
|
|
||||||
},
|
|
||||||
...discounts,
|
|
||||||
...mode,
|
...mode,
|
||||||
|
...discounts,
|
||||||
subscription_data: {
|
subscription_data: {
|
||||||
...trials,
|
...trials,
|
||||||
},
|
},
|
||||||
success_url: this.url.link(params.successCallbackLink, {
|
success_url: this.url.link(params.successCallbackLink),
|
||||||
session_id: '{CHECKOUT_SESSION_ID}',
|
|
||||||
}),
|
|
||||||
customer: customer.stripeCustomerId,
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -111,27 +111,21 @@ export class WorkspaceSubscriptionManager extends SubscriptionManager {
|
|||||||
});
|
});
|
||||||
|
|
||||||
return this.stripe.checkout.sessions.create({
|
return this.stripe.checkout.sessions.create({
|
||||||
|
customer: customer.stripeCustomerId,
|
||||||
line_items: [
|
line_items: [
|
||||||
{
|
{
|
||||||
price: price.price.id,
|
price: price.price.id,
|
||||||
quantity: count,
|
quantity: count,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
customer_update: {
|
|
||||||
name: 'auto',
|
|
||||||
},
|
|
||||||
tax_id_collection: {
|
|
||||||
enabled: true,
|
|
||||||
},
|
|
||||||
...discounts,
|
|
||||||
mode: 'subscription',
|
mode: 'subscription',
|
||||||
success_url: this.url.link(params.successCallbackLink),
|
|
||||||
customer: customer.stripeCustomerId,
|
|
||||||
subscription_data: {
|
subscription_data: {
|
||||||
metadata: {
|
metadata: {
|
||||||
workspaceId: args.workspaceId,
|
workspaceId: args.workspaceId,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
...discounts,
|
||||||
|
success_url: this.url.link(params.successCallbackLink),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user