coa-dg-pay
Version:
这是一个轻量的汇付支付SDK服务商版 for Node.js
31 lines (30 loc) • 1.18 kB
TypeScript
export interface DgPayConfig {
endpoint: string;
publicKey: string;
privateKey: string;
sys_id: string;
product_id: string;
dgpublicKey: string;
notifyUrlMap: Record<string, string>;
settle_config: Record<string, string>;
wx_conf_list: Array<Record<string, any>>;
cash_config: Record<string, any>;
wx_conf_list_unincorporate: Array<Record<string, any>>;
}
export declare class DgPayBin {
readonly config: DgPayConfig;
protected readonly thresholdTooLong: number;
constructor(config: DgPayConfig);
uploadFile(url: string, data: Record<string, any>, imagePath: string): Promise<any>;
request(url: string, data: Record<string, any>, unErrorCode?: Record<string, boolean>): Promise<any>;
onRequest(params: any, content: any, response: any): void;
onRequestError(url: any, params: any, response: any, error: any): void;
onRequestTooLong(url: any, param: any, response: any, time: {
startAt: number;
endAt: number;
}): void;
private buildParams;
private handleResult;
verifyAsyncSign(res: any, unErrorCode?: Record<string, any>): any;
verifyAsyncBusiOpenSign(res: any): any;
}