@cqmbr/merchant-node-sdk

1.0.3 • Public • Published

Merchant SDK

Merchant SDK for Node

Install

npm i @cqmbr/merchant-node-sdk

Usage

const { PrePayHttpRequest, PayCallback, WithdrawCallback, MerchantCoinRequest, TransactionRequest } = require('@cqmbr/merchant-node-sdk')

// 预支付
const prePayHttpRequest = new PrePayHttpRequest()
const prePayRes = async prePayHttpRequest.sendPrePay(requestBody, merchantPrivateKey, mbrPublicKey)

// 支付回调
const payCallbackData = PayCallback.httpPayCallback(requestString, merchantPrivateKey, mbrPublicKey)

// 提现回调
const withdrawCallbackData = WithdrawCallback.httpWithdrawCallback(requestString, merchantPrivateKey, mbrPublicKey)

// 获取当前商户币种列表
const merchantCoinRequest = new MerchantCoinRequest()
const coinList = async merchantCoinRequest.queryCoinList(merchantId, merchantPrivateKey, mbrPublicKey)

// 提现
const transactionRequest = new TransactionRequest()
const withdrawRes = async transactionRequest.withdraw(withDrawParams, merchantPrivateKey, mbrPublicKey)

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.30latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.30

Package Sidebar

Install

npm i @cqmbr/merchant-node-sdk

Weekly Downloads

0

Version

1.0.3

License

MIT

Unpacked Size

55.8 kB

Total Files

42

Last publish

Collaborators

  • kagawa