default unknown Stripe plans to free
This commit is contained in:
+1
-1
@@ -1322,7 +1322,7 @@ const server = http.createServer(async (req, res) => {
|
|||||||
const email = typeof rawEmail === 'string' ? rawEmail.trim().toLowerCase() : '';
|
const email = typeof rawEmail === 'string' ? rawEmail.trim().toLowerCase() : '';
|
||||||
const rawPlanId = o.metadata?.planId;
|
const rawPlanId = o.metadata?.planId;
|
||||||
const candidatePlan = typeof rawPlanId === 'string' ? rawPlanId.trim() : '';
|
const candidatePlan = typeof rawPlanId === 'string' ? rawPlanId.trim() : '';
|
||||||
const planId = ['pro', 'kurumsal'].includes(candidatePlan) ? candidatePlan : 'pro';
|
const planId = ['pro', 'kurumsal'].includes(candidatePlan) ? candidatePlan : 'ucretsiz';
|
||||||
if (email) {
|
if (email) {
|
||||||
store.setPlan(email, {
|
store.setPlan(email, {
|
||||||
plan: planId, kaynak: 'stripe',
|
plan: planId, kaynak: 'stripe',
|
||||||
|
|||||||
Reference in New Issue
Block a user