feat(trade): upload WeChat mini program shipping info
Hook SHIPPING and on-site pickup to upload_shipping_info for settlement unlock. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -39,6 +39,41 @@ export type WechatWxaCodeUnlimitedInput = {
|
||||
isHyaline?: boolean;
|
||||
};
|
||||
|
||||
/** 小程序发货信息管理 — 发货信息录入 */
|
||||
export type WechatUploadShippingInfoInput = {
|
||||
/** 1=商户单号;2=微信支付单号 */
|
||||
orderNumberType: 1 | 2;
|
||||
transactionId?: string;
|
||||
mchId?: string;
|
||||
outTradeNo?: string;
|
||||
/** 1 快递 2 同城 3 虚拟 4 自提 */
|
||||
logisticsType: 1 | 2 | 3 | 4;
|
||||
/** 1 统一发货 2 分拆发货 */
|
||||
deliveryMode?: 1 | 2;
|
||||
shippingList: Array<{
|
||||
trackingNo?: string;
|
||||
/** 微信运力 ID,如 SF / STO */
|
||||
expressCompany?: string;
|
||||
itemDesc: string;
|
||||
contact?: {
|
||||
consignorContact?: string;
|
||||
receiverContact?: string;
|
||||
};
|
||||
}>;
|
||||
uploadTime: string;
|
||||
payerOpenId: string;
|
||||
};
|
||||
|
||||
export type WechatUploadShippingInfoResult = {
|
||||
errcode: number;
|
||||
errmsg: string;
|
||||
};
|
||||
|
||||
export type WechatDeliveryCompany = {
|
||||
deliveryId: string;
|
||||
deliveryName: string;
|
||||
};
|
||||
|
||||
export interface IWechatProvider {
|
||||
isEnabled(): boolean;
|
||||
|
||||
@@ -95,4 +130,13 @@ export interface IWechatProvider {
|
||||
|
||||
/** 获取不限制的小程序码(PNG Buffer),须服务端调用 */
|
||||
getWxaCodeUnlimited(input: WechatWxaCodeUnlimitedInput): Promise<Buffer>;
|
||||
|
||||
/**
|
||||
* 小程序发货信息录入(交易资金解冻前置)
|
||||
* @see https://developers.weixin.qq.com/miniprogram/dev/server/API/order_shipping/api_uploadshippinginfo.html
|
||||
*/
|
||||
uploadShippingInfo(input: WechatUploadShippingInfoInput): Promise<WechatUploadShippingInfoResult>;
|
||||
|
||||
/** 获取运力公司列表(快递公司 delivery_id) */
|
||||
getDeliveryList(): Promise<WechatDeliveryCompany[]>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user