Interface: WantuPayClientOptions
Properties
apiSecret
apiSecret:
string
请求签名密钥。只从环境变量/密钥管理注入,绝不进代码库。
baseUrl
baseUrl:
string
网关地址(生产 https://pay-api.wantutech.com,联调地址开通时提供;尾斜杠可有可无)。
httpRequest?
optionalhttpRequest?:HttpRequest
自定义 HTTP 实现(测试注入用)。
merchantId
merchantId:
string
商户标识,如 mch_7f2a9c。
now?
optionalnow?: () =>Date
自定义时钟(测试注入用)。
Returns
Date
timeoutMs?
optionaltimeoutMs?:number
单次请求超时,默认 10 秒。
webhookSecret?
optionalwebhookSecret?:string
可选独立 webhook 密钥;未配置则 webhook 验签共用 apiSecret。