mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
refactor: update stripe envs
This commit is contained in:
@@ -9,19 +9,23 @@ export const stripe = new Stripe(process.env.STRIPE_SECRET_KEY || "", {
|
|||||||
apiVersion: "2024-09-30.acacia",
|
apiVersion: "2024-09-30.acacia",
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const BASE_PRICE_MONTHLY_ID = process.env.BASE_PRICE_MONTHLY_ID || ""; // $4.00
|
||||||
|
|
||||||
|
const BASE_ANNUAL_MONTHLY_ID = process.env.BASE_ANNUAL_MONTHLY_ID || ""; // $7.99
|
||||||
|
|
||||||
export const getStripeItems = (serverQuantity: number, isAnnual: boolean) => {
|
export const getStripeItems = (serverQuantity: number, isAnnual: boolean) => {
|
||||||
const items = [];
|
const items = [];
|
||||||
|
|
||||||
if (isAnnual) {
|
if (isAnnual) {
|
||||||
items.push({
|
items.push({
|
||||||
price: "price_1QC7XwF3cxQuHeOz68CpnIUZ",
|
price: BASE_ANNUAL_MONTHLY_ID,
|
||||||
quantity: serverQuantity,
|
quantity: serverQuantity,
|
||||||
});
|
});
|
||||||
|
|
||||||
return items;
|
return items;
|
||||||
}
|
}
|
||||||
items.push({
|
items.push({
|
||||||
price: "price_1QC7X5F3cxQuHeOz1859ljDP",
|
price: BASE_PRICE_MONTHLY_ID,
|
||||||
quantity: serverQuantity,
|
quantity: serverQuantity,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user