Add WeChat in-app JSAPI recharge for g2.tkmind.cn.
Use JSAPI with bound openid inside WeChat instead of QR long-press, and include related auth redirect and admin UX fixes. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+3
-1
@@ -1097,7 +1097,9 @@ app.post('/auth/billing/recharge-orders', jsonBody, async (req, res) => {
|
||||
const me = await userAuth.getMe(userToken(req));
|
||||
if (!me) return res.status(401).json({ message: '未登录' });
|
||||
const amountCents = Number(req.body?.amountCents);
|
||||
const payScene = req.body?.payScene === 'h5' ? 'h5' : 'native';
|
||||
const payScene = ['native', 'h5', 'jsapi'].includes(req.body?.payScene)
|
||||
? req.body.payScene
|
||||
: 'native';
|
||||
const result = await rechargeService.createOrder({
|
||||
userId: me.id,
|
||||
amountCents,
|
||||
|
||||
Reference in New Issue
Block a user