Skip to content

Latest commit

 

History

History
259 lines (146 loc) · 5.93 KB

MbdPay.md

File metadata and controls

259 lines (146 loc) · 5.93 KB

@letscollab/mbdpay / Exports / MbdPay

Class: MbdPay

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new MbdPay(appId, appKey, options?)

Parameters

Name Type
appId string
appKey string
options? MdbpayOptions

Defined in

sdk.ts:56

Properties

#BASE_URL

Private #BASE_URL: string = 'https://api.mianbaoduo.com'

Defined in

sdk.ts:49


#OPENID_URL

Private #OPENID_URL: string = 'https://mbd.pub/openid'

Defined in

sdk.ts:50


#client

Private #client: Got

Defined in

sdk.ts:52


basicOptions

Private basicOptions: any = {}

Defined in

sdk.ts:54

Methods

#getBody

Private #getBody(options, addition?): string

Parameters

Name Type
options Record<string, any>
addition? Record<string, any>

Returns

string

Defined in

sdk.ts:77


#getSign

Private #getSign(options, appKey): string

Parameters

Name Type
options Record<string, any>
appKey string

Returns

string

Defined in

sdk.ts:70


aliPay

aliPay(options): CancelableRequest<Response<string>>

see https://doc.mbd.pub/api/zhi-fu-bao-zhi-fu

Parameters

Name Type
options AliOptions

Returns

CancelableRequest<Response<string>>

Defined in

sdk.ts:114


getOpenId

getOpenId(options): Promise<Response<string>>

see https://doc.mbd.pub/api/huo-qu-yong-hu-openid

Parameters

Name Type
options OpenIdOptions

Returns

Promise<Response<string>>

Defined in

sdk.ts:87


getOrder

getOrder(options): CancelableRequest<Response<string>>

see https://doc.mbd.pub/api/ding-dan-cha-xun

Parameters

Name Type
options GetOrderOptions

Returns

CancelableRequest<Response<string>>

Defined in

sdk.ts:132


refund

refund(options): CancelableRequest<Response<string>>

see https://doc.mbd.pub/api/tui-kuan

Parameters

Name Type
options RefundOptions

Returns

CancelableRequest<Response<string>>

Defined in

sdk.ts:123


weChatPay

weChatPay(options): Promise<Response<string>>

see https://doc.mbd.pub/api/wei-xin-zhi-fu

Parameters

Name Type
options WeChatOptions

Returns

Promise<Response<string>>

Defined in

sdk.ts:96


weChatPayH5

weChatPayH5(options): CancelableRequest<Response<string>>

see https://doc.mbd.pub/api/wei-xin-h5-zhi-fu

Parameters

Name Type
options WeChatH5Options

Returns

CancelableRequest<Response<string>>

Defined in

sdk.ts:105