egg-plugin-wechat-pay
Install
$ npm i egg-plugin-wechat-pay --save
Usage
// {app_root}/config/plugin.jsexportseggPluginWechatPay = enable: true package: 'egg-plugin-wechat-pay';
Configuration
// {app_root}/config/config.default.jsexportseggPluginWechatPay = ;
see config/config.default.js for more detail.
Example
使用方式
- 在config/config.default.js中增加配置
"wechatPay": // 是否实例化支付业务类 默认false, 只有为true,该实例才能出现在应用类中 'appPay': appId: '' 'key': '' 'mchId': '' 'pfx': '' // 允许传Buffer或者证书的本地路径 // APP 支付 'litePay': appId: '' // 小程序支付 'pubPay': appId: '' // 公众号支付 'pubQrPay': appId: '' // 扫码支付 'pubScanPay': appId: '' // 刷卡支付 'wapPay': appId: '' // H5 支付
- 就可以使用 类似 app.appPay 调用实例
Questions & Suggestions
Please open an issue here.