Revert "fix: 微信支付暂时统一使用 Native 扫码模式"

This reverts commit ef1078279a.
This commit is contained in:
erio
2026-03-06 22:32:53 +08:00
parent ef1078279a
commit 918750047a

View File

@@ -35,22 +35,20 @@ export class WxpayProvider implements PaymentProvider {
throw new Error('WXPAY_NOTIFY_URL is required'); throw new Error('WXPAY_NOTIFY_URL is required');
} }
// TODO: H5 支付需要在微信商户平台开通权限,开通后取消注释 if (request.isMobile) {
// if (request.isMobile) { if (!request.clientIp) {
// if (!request.clientIp) { throw new Error('clientIp is required for H5 payment');
// throw new Error('clientIp is required for H5 payment'); }
// } const h5Url = await createH5Order({
// const h5Url = await createH5Order({ out_trade_no: request.orderId,
// out_trade_no: request.orderId, description: request.subject,
// description: request.subject, notify_url: notifyUrl,
// notify_url: notifyUrl, amount: request.amount,
// amount: request.amount, payer_client_ip: request.clientIp,
// payer_client_ip: request.clientIp, });
// }); return { tradeNo: request.orderId, payUrl: h5Url };
// return { tradeNo: request.orderId, payUrl: h5Url }; }
// }
// 统一使用 Native 扫码模式PC + 移动端)
const codeUrl = await createPcOrder({ const codeUrl = await createPcOrder({
out_trade_no: request.orderId, out_trade_no: request.orderId,
description: request.subject, description: request.subject,