This commit is contained in:
eric
2026-04-02 00:29:36 -05:00
parent de86a65293
commit 180e81e090
2 changed files with 9 additions and 0 deletions

View File

@@ -15,6 +15,8 @@ export type XorPayStatusResult = {
status?: string;
error?: string;
url: string;
/** 网关返回的实付金额(元),有则用于换算分;无则由调用方回退默认金额 */
pay_price?: string | number | null;
};
function buildXorPaySign(orderId: string): string {
@@ -55,6 +57,7 @@ export async function queryXorPayOrderStatus(
status,
url: url.toString(),
error: res.ok ? undefined : `status=${res.status}`,
pay_price: data?.pay_price ?? data?.price ?? null,
};
} catch (error) {
return {