fix: 易支付移动端使用 payurl2 进行微信H5支付
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
@@ -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,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user