feat(billing): guide parents to recharge the child account

This commit is contained in:
brother7 committed 2026-10-09 08:43:05 +08:00
1 parent fe1a3775c5
commit 281e6dc151
10 files changed
+105 -14

No files matched your search

+6
View File
@@ -101,6 +101,12 @@ describe('permanent points Main contract', () => {
const result = await call('/me');
expect(result.status).toBe(409); expect(result.body.data).toBeUndefined();
});
it('does not translate an unavailable current-account recharge into a parent-identity requirement', async () => {
reply({ detail: '当前账号暂不能充值词元点数' }, 403);
const result = await call('/recharge/orders', 'POST', { productId: 'p', requestId: 'r' });
expect(result.body).toMatchObject({ commandOutcome: 'definitive_failure', error: '当前账号暂不能充值,请在社区账户页查看原因或联系支持。' });
expect(result.body.error).not.toContain('联系家长');
});
it.each(['/plans', '/reset-cards', '/subscriptions', '/reset-card-orders'])('retires %s without contacting payment services', async (path) => {
expect((await call(path)).status).toBe(410); expect(net).not.toHaveBeenCalled();
});