fix: 易支付移动端使用 payurl2 进行微信H5支付

This commit is contained in:
erio
2026-03-16 22:35:27 +08:00
parent a3f3fa83f1
commit af9820a2ee
3 changed files with 3 additions and 2 deletions

View File

@@ -70,7 +70,7 @@ export async function createPayment(opts: CreatePaymentOptions): Promise<EasyPay
} }
if (opts.isMobile) { if (opts.isMobile) {
params.device = 'jump'; params.device = 'mobile';
} }
const sign = generateSign(params, env.EASY_PAY_PKEY); const sign = generateSign(params, env.EASY_PAY_PKEY);

View File

@@ -34,7 +34,7 @@ export class EasyPayProvider implements PaymentProvider {
return { return {
tradeNo: result.trade_no, tradeNo: result.trade_no,
payUrl: result.payurl, payUrl: (request.isMobile && result.payurl2) || result.payurl,
qrCode: result.qrcode, qrCode: result.qrcode,
}; };
} }

View File

@@ -18,6 +18,7 @@ export interface EasyPayCreateResponse {
trade_no: string; trade_no: string;
O_id?: string; O_id?: string;
payurl?: string; payurl?: string;
payurl2?: string;
qrcode?: string; qrcode?: string;
img?: string; img?: string;
} }