feat: 同步管理端、用户端与后端业务,并接通线上 Web 接口
补齐平台订阅、外部登录、CRM 同步与用户端页面;Nginx 转发用户端接口,登录页使用 Google 与 Apple 标志。 Co-authored-by: Cursor <cursoragent@cursor.com>
这个提交包含在:
@@ -313,6 +313,11 @@ describe('OmniCard AI 30-Point End-to-End Pipeline Integration Suite', () => {
|
||||
CardPortalService.clearAllCache();
|
||||
|
||||
nfcAntiTamperService = new NfcAntiTamperService();
|
||||
const e2eAuditLogs: any[] = [];
|
||||
nfcAntiTamperService.setAuditRepository({
|
||||
save: (log: any) => { e2eAuditLogs.push(log); },
|
||||
list: () => [...e2eAuditLogs],
|
||||
});
|
||||
|
||||
crmRadarService = new CrmRadarService();
|
||||
crmRadarService.crmTrackEntity = trackRepo as any;
|
||||
@@ -1181,12 +1186,33 @@ describe('OmniCard AI 30-Point End-to-End Pipeline Integration Suite', () => {
|
||||
});
|
||||
|
||||
it('P29: Stripe 国际信用卡结算会话创建与 Webhook 自动化入账 (TeamStripeService)', async () => {
|
||||
// 1. 创建 Enterprise 年付结算会话
|
||||
const session = await teamStripeService.createCheckoutSession({
|
||||
tenantId: sharedTenantId,
|
||||
plan: 'enterprise',
|
||||
billingCycle: 'yearly',
|
||||
// 1. 创建 Enterprise 年付结算会话(需密钥 + Stripe API;此处 mock axios)
|
||||
const prevStripeKey = process.env.STRIPE_SECRET_KEY;
|
||||
process.env.STRIPE_SECRET_KEY = 'sk_test_e2e_mock_key';
|
||||
const axios = require('axios');
|
||||
const axiosPostSpy = jest.spyOn(axios, 'post').mockResolvedValue({
|
||||
data: {
|
||||
id: 'cs_test_e2e_enterprise_yearly',
|
||||
url: 'https://checkout.stripe.com/c/pay/cs_test_e2e_enterprise_yearly',
|
||||
},
|
||||
});
|
||||
let session: Awaited<
|
||||
ReturnType<typeof teamStripeService.createCheckoutSession>
|
||||
>;
|
||||
try {
|
||||
session = await teamStripeService.createCheckoutSession({
|
||||
tenantId: sharedTenantId,
|
||||
plan: 'enterprise',
|
||||
billingCycle: 'yearly',
|
||||
});
|
||||
} finally {
|
||||
axiosPostSpy.mockRestore();
|
||||
if (prevStripeKey === undefined) {
|
||||
delete process.env.STRIPE_SECRET_KEY;
|
||||
} else {
|
||||
process.env.STRIPE_SECRET_KEY = prevStripeKey;
|
||||
}
|
||||
}
|
||||
expect(session.amount).toBe(99000); // $990.00 / 年
|
||||
expect(session.sessionId).toMatch(/^cs_test_/);
|
||||
expect(session.url).toContain(session.sessionId);
|
||||
|
||||
在新工单中引用
屏蔽一个用户