微信JSSDK对接,代下单支付

This commit is contained in:
2026-08-02 11:49:35 +08:00
parent 50ba6e9c56
commit 09e732bfa3
32 changed files with 1223 additions and 218 deletions
+34 -2
View File
@@ -1,3 +1,5 @@
import type { WechatJsapiPrepayParams } from './wechat';
export interface OrderDto {
id: string;
orderNo: string;
@@ -27,11 +29,41 @@ export interface OrderPreviewResult {
deliveryType: 'LOCAL' | 'CROSS_CITY';
}
export type ProxyPayMethod = 'NATIVE' | 'JSAPI';
export interface PayOrderResult {
mode?: 'jsapi' | 'mock';
mode?: 'jsapi' | 'mock' | 'native';
orderId?: string;
codeUrl?: string;
prepay?: WechatJsapiPrepayParams;
payExpireAt?: string | null;
}
export type ProxyOrderPayRequest = {
payMethod: ProxyPayMethod;
};
export type ProxyOrderPayResponse = {
mode: 'jsapi' | 'mock' | 'native';
orderId: string;
orderNo?: string;
codeUrl?: string;
prepay?: WechatJsapiPrepayParams;
payExpireAt?: string | null;
};
export type ProxyOrderCreateResponse = {
id: string;
orderNo: string;
status: string;
payStatus: string;
payAmount: number;
benefitAmount: number;
deliveryType: string;
payExpireAt: string | null;
proxyPartnerName?: string | null;
};
export interface DeliveryDto {
provider?: string;
shippingAt?: string;
@@ -127,7 +159,7 @@ export type PartnerProxyOrderListResponse = {
pageSize: number;
};
/** 总部代下单(线下完成发权益,无需短信验证 */
/** 总部代下单(在线支付后发权益 */
export type HqProxyOrderCreateRequest = {
phone: string;
deliveryMode: PartnerProxyDeliveryMode;