Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Base

基类

Hierarchy

Index

Constructors

constructor

Properties

appId

appId: string

公众账号ID

debug

debug: boolean = false

仿真模式开关

key

key: string

密钥

keyForDebug

keyForDebug: string

测试用验签密钥

mchId

mchId: string

商户号

pfx

pfx: Buffer

证书

Methods

Protected completeURL

  • completeURL(base: string): string

Protected createFetchOptions

  • createFetchOptions(url: string, usePfx?: boolean): Promise<FetchOptions>

Protected getKey

  • getKey(): string

setDebug

  • setDebug(useDebug: boolean): Promise<void>

verifySign

  • verifySign(data: object, signType?: SignType): boolean
  • 校验 sign

    Parameters

    • data: object
      • sign: string
    • Default value signType: SignType = types.SignType.MD5

    Returns boolean

Generated using TypeDoc