提交 9de46713 编写于 作者: VK1688's avatar VK1688

update unipay.md

上级 6b90892e
...@@ -64,13 +64,15 @@ const unipay = require('@dcloudio/unipay') ...@@ -64,13 +64,15 @@ const unipay = require('@dcloudio/unipay')
| timeout | Number | 否 | 5000 | 请求超时时间,单位:毫秒 | | timeout | Number | 否 | 5000 | 请求超时时间,单位:毫秒 |
```js ```js
const path = require('path'); // 引入内置的path模块
const unipayIns = unipay.initWeixinV3({ const unipayIns = unipay.initWeixinV3({
appId: 'your appId', appId: 'your appId',
mchId: 'your mchId', mchId: 'your mchId',
v3Key: 'you parterner key', v3Key: 'you parterner key',
appCertPath: path.resolve('/path/to/you/cert'), appCertPath: path.resolve(__dirname, 'your appCertPath'),
// appCertContent: "", // appCertContent: "",
appPrivateKeyPath: path.resolve('/path/to/you/privateKey'), appPrivateKeyPath: path.resolve(__dirname, 'your appPrivateKeyPath'),
// appPrivateKeyContent: "", // appPrivateKeyContent: "",
}) })
``` ```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册