node-wxpay-v3
v1.0.7
Published
微信V3支付接口封装
Downloads
3
Readme
前言
- 封装微信支付V3接口
- 微信支付官方文档:https://pay.weixin.qq.com/wiki/doc/apiv3/index.shtml
安装依赖
npm i node-wxpay-v3
使用
- privateKeyPath 证书地址
- mchid 商户号
- serial_no 证书序列号
//引入包
const { init, API } = require('node-wxpay-v3')
//初始化
wxpayV3.init({
privateKeyPath: path.join(__dirname, './cert/apiclient_key.pem'),
mchid: '',
serial_no: '',
})
//发起商家转账
API.merchantTransfer.v3TransferBatches(data).then()
商家转账到零钱
- API.merchantTransfer[方法名]
| 方法名 | 参数 | 备注 | | -------------------------------------- | ----------------------------- | -------------------------------- | | v3TransferBatches | (body 参数) | 发起商家转账 API | | v3TransferBatchesBatchId | (batch_id, body 参数) | 微信批次单号查询批次单 API | | v3TransferBatchesBatchIdDetailId | (batch_id, detail_id) | 微信明细单号查询明细单 API | | v3TransferBatchesOutBatchNo | (out_batch_no, body 参数) | 商家批次单号查询批次单 API | | v3TransferBatchesOutBatchNoOutDetailNo | (out_batch_no, out_detail_no) | 商家明细单号查询明细单 API | | v3TransferBillReceipt | (body 参数) | 转账电子回单申请受理 API | | v3TransferBillReceiptOutBatchNo | (out_batch_no) | 查询转账电子回单 API | | v3TransferDetailElectronicReceipts | (body 参数) | 转账明细电子回单受理 API | | v3TransferDetailElectronicReceiptsGet | (body 参数) | 查询转账明细电子回单受理结果 API |