提交 3f46ca89 编写于 作者: 雪洛's avatar 雪洛

docs: unipay

上级 12bbe5e6
......@@ -67,6 +67,17 @@ const unipayIns = unipay.initWeixin({
key: 'you parterner key',
pfx: fs.readFileSync('/path/to/your/pfxfile'), // p12文件路径,使用微信退款时需要,需要注意的是阿里云目前不支持以相对路径读取文件,请使用绝对路径的形式
})
// 以证书放在云函数index.js同级的cert目录下为例,index.js内可以按照下面这个写
const fs = require('fs');
const path = require('path');
const unipayIns = unipay.initWeixin({
appId: 'your appId',
mchId: 'your mchId',
key: 'you parterner key',
pfx: fs.readFileSync(path.resolve(__dirname, 'cert/xxx.p12'))
})
```
### 支付宝支付
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册