fix: H5 fallback 仅在 NO_AUTH 时触发,其他错误正常抛出
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -45,7 +45,9 @@ export class WxpayProvider implements PaymentProvider {
|
||||
payer_client_ip: request.clientIp,
|
||||
});
|
||||
return { tradeNo: request.orderId, payUrl: h5Url };
|
||||
} catch {
|
||||
} catch (err) {
|
||||
const msg = err instanceof Error ? err.message : '';
|
||||
if (!msg.includes('NO_AUTH')) throw err;
|
||||
// H5 未开通,fallback 到 Native 扫码
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user