egg-szjcomo-wxpay

1.0.0 • Public • Published

egg-szjcomo-wxpay

基于egg.js的微信支付插件

插件安装

$ npm i egg-szjcomo-wxpay --save

插件依赖

npm i egg-szjcomo-utils --save

插件使用

// {app_root}/config/plugin.js
exports.wxpay = {
  enable: true,
  package: 'egg-szjcomo-wxpay',
};

插件配置

// {app_root}/config/config.default.js
exports.wxpay = {
    appid:'可选',
    mch_id:'可选',
    device_info:'可选',
    notify_url:'可选',
    key:'可选',
    ssl_cert:'path 可选',
    ssl_key:'path 可选'
};

see config/config.default.js for more detail.

特别说明

如果配置项中配置有参数,可以在OPTIONS中不用传参

插件API

orderCreate 创建订单

参数 类型 是否必填 备注说明
options object 请查看微信订单创建参数统一下单
key string 支付密钥(配置项中未配置必填)
debug bool 调试开关

orderClose 关闭订单

参数 类型 是否必填 备注说明
options object 请查看微信订单关闭参数关闭订单
key string 支付密钥(配置项中未配置必填)
debug bool 调试开关

orderQuery 订单查询

参数 类型 是否必填 备注说明
options object 请查看微信订单查询参数订单查询
key string 支付密钥(配置项中未配置必填)
debug bool 调试开关

orderRefund 退款申请

参数 类型 是否必填 备注说明
options object 请查看微信订单查询参数申请退款
key string 支付密钥(配置项上中未配置必填)
ssl_cert string 证书(配置项中未配置必填)
ssl_key string 证书(配置项中未配置必填)
debug bool 调试开关

refundQuery 退款查询

参数 类型 是否必填 备注说明
options object 请查看微信订单查询参数退款查询
key string 支付密钥(配置项上中未配置必填)
ssl_cert string 证书(配置项中未配置必填)
ssl_key string 证书(配置项中未配置必填)
debug bool 调试开关

Package Sidebar

Install

npm i egg-szjcomo-wxpay

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

24.8 kB

Total Files

6

Last publish

Collaborators

  • como20170606