feat: 接入微信小程序支付

This commit is contained in:
2026-05-14 00:16:17 +08:00
parent bf4423e53b
commit ae58a443a3
42 changed files with 2265 additions and 191 deletions

View File

@@ -538,8 +538,9 @@ describe('authService', () => {
const sessions = await getAuthSessions();
expect(sessions).toHaveLength(1);
expect(sessions[0].sessionIds).toEqual(['usess_1', 'usess_2']);
expect(sessions[0].sessionCount).toBe(2);
const [session] = sessions;
expect(session?.sessionIds).toEqual(['usess_1', 'usess_2']);
expect(session?.sessionCount).toBe(2);
});
it('revokes a single auth session by backend route', async () => {

View File

@@ -90,6 +90,7 @@ export function getRpgProfileRechargeCenter(
export function createRpgProfileRechargeOrder(
productId: string,
paymentChannel = 'mock',
options: RuntimeRequestOptions = {},
) {
return requestRpgRuntimeJson<CreateProfileRechargeOrderResponse>(
@@ -97,7 +98,7 @@ export function createRpgProfileRechargeOrder(
{
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ productId, paymentChannel: 'mock' }),
body: JSON.stringify({ productId, paymentChannel }),
},
'充值失败',
options,