diff --git a/server.ts b/server.ts index 14e48fe..831d7f3 100644 --- a/server.ts +++ b/server.ts @@ -333,7 +333,7 @@ app.post('/api/courses/:id/unlock', authenticateToken, checkoutRateLimiter, asyn try { let customerId = user.asaasCustomerId; const apiKey = AsaasService.getApiKey(); - if (apiKey && (customerId?.startsWith('cus_sim_') || customerId?.startsWith('cus_fallback_'))) { + if (apiKey && (customerId?.startsWith('cus_sim_') || customerId?.startsWith('cus_fallback_') || ['cus_test', 'cus_00001', 'cus_00002', 'cus_00003', 'cus_00004'].includes(customerId || ''))) { customerId = null; } if (!customerId) { @@ -517,7 +517,7 @@ app.post('/api/subscription/subscribe', authenticateToken, async (req: Authentic try { let customerId = user.asaasCustomerId; const apiKey = AsaasService.getApiKey(); - if (apiKey && (customerId?.startsWith('cus_sim_') || customerId?.startsWith('cus_fallback_'))) { + if (apiKey && (customerId?.startsWith('cus_sim_') || customerId?.startsWith('cus_fallback_') || ['cus_test', 'cus_00001', 'cus_00002', 'cus_00003', 'cus_00004'].includes(customerId || ''))) { customerId = null; } if (!customerId) {