Options
All
  • Public
  • Public/Protected
  • All
Menu

@sigodenjs/wechatpay

Index

Enumerations

Classes

Interfaces

Type aliases

Variables

Functions

Type aliases

AuthCodeToOpenIdFail

AuthCodeToOpenIdFail: FailT<AuthCodeToOpenIdResponseFail>

AuthCodeToOpenIdSuccess

AuthCodeToOpenIdSuccess: SuccessT<AuthCodeToOpenIdResponseSuccess>

BatchQueryCommentFail

BatchQueryCommentFail: FailT<BatchQueryCommentResponseFail>

BatchQueryCommentSuccess

BatchQueryCommentSuccess: SuccessT<BatchQueryCommentResponseSuccess>

CloseOrderFail

CloseOrderFail: FailT<CloseOrderResponseFail>

CloseOrderSuccess

ContractNotifyFail

ContractNotifyFail: FailT<ContractNotifyOptionsFail>

ContractNotifyHandler

ContractNotifyHandler: function

Type declaration

ContractNotifySuccess

ContractNotifySuccess: SuccessT<ContractNotifyOptionsSuccess>

ContractOrderFail

ContractOrderFail: FailT<ContractOrderResponseFail>

ContractOrderSuccess

ContractOrderSuccess: SuccessT<ContractOrderResponseSuccess>

DeleteContractFail

DeleteContractFail: FailT<DeleteContractResponseFail>

DeleteContractSuccess

DeleteContractSuccess: SuccessT<DeleteContractResponseSuccess>

FailT

FailT: T & FailReturn

业务逻辑失败返回数据

GetHbInfoFail

GetHbInfoSuccess

GetPublicKeyFail

GetPublicKeyFail: FailT<GetPublicKeyResponseFail>

GetPublicKeySuccess

GetSignKeyFail

GetSignKeyFail: FailT<GetSignKeyResponseFail>

GetSignKeySuccess

GetTransferInfoFail

GetTransferInfoFail: FailT<GetTransferInfoResponseFail>

GetTransferInfoSuccess

GetTransferInfoSuccess: SuccessT<GetTransferInfoResponseSuccess>

MicroPayFail

MicroPaySuccess

OrderQueryFail

OrderQueryFail: FailT<OrderQueryResponseFail>

OrderQuerySuccess

PapOrderQueryFail

PapOrderQueryFail: FailT<PapOrderQueryResponseFail>

PapOrderQuerySuccess

PapOrderQuerySuccess: SuccessT<PapOrderQueryResponseSuccess>

PapPayApplyFail

PapPayApplyFail: FailT<PapPayApplyResponseFail>

PapPayApplySuccess

PapPayNotifyFail

PapPayNotifyFail: FailT<PapPayNotifyOptionsFail>

PapPayNotifyHandler

PapPayNotifyHandler: function

Type declaration

PapPayNotifySuccess

PapPayNotifySuccess: SuccessT<PapPayNotifyOptionsSuccess>

PayBankFail

PayBankSuccess

PayNotifyFail

PayNotifyHandler

PayNotifyHandler: function

Type declaration

PayNotifySuccess

PayNotifySuccess: SuccessT<PayNotifyOptionCommon>

QueryBankFail

QueryBankSuccess

QueryContractFail

QueryContractFail: FailT<QueryContractResponseFail>

QueryContractSuccess

QueryContractSuccess: SuccessT<QueryContractResponseSuccess>

QueryCouponStockFail

QueryCouponStockFail: FailT<QueryCouponStockResponseFail>

QueryCouponStockSuccess

QueryCouponStockSuccess: SuccessT<QueryCouponStockResponseSuccess>

QueryCouponsInfoFail

QueryCouponsInfoFail: FailT<QueryCouponsInfoResponseFail>

QueryCouponsInfoSuccess

QueryCouponsInfoSuccess: SuccessT<QueryCouponsInfoResponseSuccess>

RefundFail

RefundNotifyHandler

RefundNotifyHandler: function

Type declaration

RefundQueryFail

RefundQueryFail: FailT<RefundQueryResponseFail>

RefundQuerySuccess

RefundSuccess

ReportFail

ReportSuccess

ReverseFail

ReverseSuccess

SendCouponFail

SendCouponFail: FailT<SendCouponResponseFail>

SendCouponSuccess

SendGroupRedPackFail

SendGroupRedPackFail: FailT<SendGroupRedPackResponseFail>

SendGroupRedPackSuccess

SendGroupRedPackSuccess: SuccessT<SendGroupRedPackResponseSuccess>

SendRedPackFail

SendRedPackFail: FailT<SendRedPackResponseFail>

SendRedPackSuccess

ShortURLFail

ShortURLSuccess

SuccessT

SuccessT: T & SuccessReturn

业务逻辑成功返回数据

TransfersFail

TransfersSuccess

UnifiedOrderFail

UnifiedOrderFail: FailT<UnifiedOrderResponseFail>

UnifiedOrderSuccess

Variables

Const AUTH_CODE_TO_OPENID_BASE

AUTH_CODE_TO_OPENID_BASE: "/tools/authcodetoopenid" = "/tools/authcodetoopenid"

Const BATCH_QUERY_COMMENT_BASE

BATCH_QUERY_COMMENT_BASE: "/billcommentsp/batchquerycomment" = "/billcommentsp/batchquerycomment"

Const CLOSE_ORDER_BASE

CLOSE_ORDER_BASE: "/pay/closeorder" = "/pay/closeorder"

Const CONTRACT_ORDER_BASE

CONTRACT_ORDER_BASE: "/pay/orderquery" = "/pay/orderquery"

Const DELETE_CONTRACT_BASE

DELETE_CONTRACT_BASE: "/papay/deletecontract" = "/papay/deletecontract"

Const DOWNLOAD_BILL_BASE

DOWNLOAD_BILL_BASE: "/pay/downloadbill" = "/pay/downloadbill"

Const DOWNLOAD_FUND_FLOW_BASE

DOWNLOAD_FUND_FLOW_BASE: "/pay/downloadfundflow" = "/pay/downloadfundflow"

Const ENTRUST_BASE

ENTRUST_BASE: "https://api.mch.weixin.qq.com/papay/h5entrustweb" = "https://api.mch.weixin.qq.com/papay/h5entrustweb"

Const GET_HB_INFO_BASE

GET_HB_INFO_BASE: "/mmpaymkttransfers/gethbinfo" = "/mmpaymkttransfers/gethbinfo"

Const GET_PUBLIC_URL

GET_PUBLIC_URL: "https://fraud.mch.weixin.qq.com/risk/getpublickey" = "https://fraud.mch.weixin.qq.com/risk/getpublickey"

Const GET_SIGN_KEY_BASE

GET_SIGN_KEY_BASE: "/pay/getsignkey" = "/pay/getsignkey"

Const GET_TRANSFER_INFO_BASE

GET_TRANSFER_INFO_BASE: "/mmpaymkttransfers/gettransferinfo" = "/mmpaymkttransfers/gettransferinfo"

Const MICRO_PAY_BASE

MICRO_PAY_BASE: "/pay/micropay" = "/pay/micropay"

Const ORDER_QUERY_BASE

ORDER_QUERY_BASE: "/pay/orderquery" = "/pay/orderquery"

Const PAP_ORDER_QUERY_BASE

PAP_ORDER_QUERY_BASE: "/pay/paporderquery" = "/pay/paporderquery"

Const PAP_PAY_APPLY_BASE

PAP_PAY_APPLY_BASE: "/pay/pappayapply" = "/pay/pappayapply"

Const PAY_BANK_BASE

PAY_BANK_BASE: "/mmpaysptrans/pay_bank" = "/mmpaysptrans/pay_bank"

Const QUERY_BANK_BASE

QUERY_BANK_BASE: "/mmpaysptrans/query_bank" = "/mmpaysptrans/query_bank"

Const QUERY_CONTRACT_BASE

QUERY_CONTRACT_BASE: "/papay/querycontract" = "/papay/querycontract"

Const QUERY_COUPONS_INFO_BASE

QUERY_COUPONS_INFO_BASE: "/mmpaymkttransfers/querycouponsinfo" = "/mmpaymkttransfers/querycouponsinfo"

Const QUERY_COUPON_STOCK_BASE

QUERY_COUPON_STOCK_BASE: "/mmpaymkttransfers/query_coupon_stock" = "/mmpaymkttransfers/query_coupon_stock"

Const REFUND_BASE

REFUND_BASE: "/secapi/pay/refund" = "/secapi/pay/refund"

Const REFUND_QUERY_BASE

REFUND_QUERY_BASE: "/pay/refundquery" = "/pay/refundquery"

Const REPORT_BASE

REPORT_BASE: "/payitil/report" = "/payitil/report"

Const REVERSE_BASE

REVERSE_BASE: "/secapi/pay/reverse" = "/secapi/pay/reverse"

Const SEND_COUPON_BASE

SEND_COUPON_BASE: "/mmpaymkttransfers/send_coupon" = "/mmpaymkttransfers/send_coupon"

Const SEND_GROUP_RED_PACK_BASE

SEND_GROUP_RED_PACK_BASE: "/mmpaymkttransfers/sendgroupredpack" = "/mmpaymkttransfers/sendgroupredpack"

Const SEND_RED_PACK_BASE

SEND_RED_PACK_BASE: "/mmpaymkttransfers/sendredpack" = "/mmpaymkttransfers/sendredpack"

Const SHORT_URL_BASE

SHORT_URL_BASE: "/tools/shorturl" = "/tools/shorturl"

Const TRANSFERS_BASE

TRANSFERS_BASE: "/mmpaymkttransfers/promotion/transfers" = "/mmpaymkttransfers/promotion/transfers"

Const UNIFIED_ORDER_BASE

UNIFIED_ORDER_BASE: "/pay/unifiedorder" = "/pay/unifiedorder"

Const URL_MCH

URL_MCH: "https://api.mch.weixin.qq.com" = "https://api.mch.weixin.qq.com"

Const URL_SANBOX

URL_SANBOX: string = URL_MCH + "/sandboxnew"

Functions

createRequestOptions

  • createRequestOptions<U>(data: U, extra: FetchOptions): request.Options

decode

  • decode(key: string, data: string): string
  • 解密

    Parameters

    • key: string
    • data: string

    Returns string

download

  • download<U, F>(data: U, extra: FetchOptions): Promise<string | F>

fetch

  • fetch<U, S, F>(data: U, extra: FetchOptions): Promise<S | F>

fromXML

  • fromXML<T>(data: string): Promise<T>
  • 从 XML 格式字符串生成对象

    Type parameters

    • T

    Parameters

    • data: string

    Returns Promise<T>

getSignType

getXMLBody

  • getXMLBody(req: stream.Readable, options: Options): Promise<Object>
  • 从请求中获取 xml 数据并解析

    Parameters

    • req: stream.Readable
    • options: Options

    Returns Promise<Object>

hmacSha256

  • hmacSha256(secret: string, data: string): string
  • HMAC-SHA256 加密

    Parameters

    • secret: string
    • data: string

    Returns string

md5

  • md5(data: string): string
  • md5 加密

    Parameters

    • data: string

    Returns string

nonceStr

  • nonceStr(length?: number): string
  • 生成随机字符串

    Parameters

    • Default value length: number = 32

    Returns string

rsa

  • rsa(pemKey: string, data: string): string
  • RSA 加密

    Parameters

    • pemKey: string
    • data: string

    Returns string

setBodyAppIdAndMchId

  • setBodyAppIdAndMchId(body: any, extra: FetchOptions): void

sign

  • sign(signType: SignType, data: object, secret: string): string
  • 签名

    Parameters

    • signType: SignType
    • data: object
    • secret: string

    Returns string

toXML

  • toXML(data: any): string
  • 转换成 XML 格式

    Parameters

    • data: any

    Returns string

Generated using TypeDoc