Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: 优化文档说明 #1048

Merged
merged 1 commit into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions web/docs/v3/quick-start/init.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ $config = [
// 「选填」服务商模式下,子商户id
'sub_mch_id' => '',
// 「选填」(适用于 2024-11 及之前开通微信支付的老商户)微信平台公钥证书路径,强烈建议 php-fpm 模式下配置此参数
// 「必填」微信支付公钥证书路径,key 填写形如 PUB_KEY_ID_0000000000000024101100397200000006 的公钥id,见 https://pay.weixin.qq.com/doc/v3/merchant/4013053249
// 「必填」微信支付公钥路径,key 填写形如 PUB_KEY_ID_0000000000000024101100397200000006 的公钥id,见 https://pay.weixin.qq.com/doc/v3/merchant/4013053249
'wechat_public_cert_path' => [
'45F59D4DABF31918AFCEC556D5D2C6E376675D57' => __DIR__.'/Cert/wechatPublicKey.crt',
'PUB_KEY_ID_0000000000000024101100397200000006' => __DIR__.'/Cert/publickey.pem',
Expand Down Expand Up @@ -206,7 +206,7 @@ $result = Pay::alipay()->find($order);

微信官方于 2024年11月 左右又开始整活了:[看我如何整活](https://pay.weixin.qq.com/doc/v3/merchant/4012154180)

新增了「微信支付公钥」,整活后共存「微信平台证书」、「微信支付公钥」,这两种证书区别于商户API公钥证书,主要用于微信支付响应消息时的验签动作
新增了「微信支付公钥」,整活后共存「微信平台证书」、「微信支付公钥」,这两种证书区别于商户API公钥证书,作用相同,都主要用于微信支付响应消息时的验签动作

例如,当请求给微信支付服务器时,微信支付接收到请求会作出响应,系统在接收到响应后,需要验证这个响应是不是微信支付服务器官方发出的,以防止欺诈,这个验证的动作,就会使用到微信平台公钥证书。

Expand Down Expand Up @@ -264,8 +264,8 @@ $params = [
\Yansongda\Pay\get_wechat_public_certs($params);
```

### 微信支付证书
### 微信支付公钥

2024年11月之后的新商户,默认微信这边都使用微信支付证书,关于微信证书的介绍说明,见 [微信官方文档](https://pay.weixin.qq.com/doc/v3/merchant/4012153196),其作用于「微信平台公钥证书」的作用一样
2024年11月之后的新商户,默认微信这边都使用微信支付公钥,关于微信支付公钥的介绍说明,见 [微信官方文档](https://pay.weixin.qq.com/doc/v3/merchant/4012153196),其作用于「微信平台证书」的作用一样

此证书需要在微信支付后台手动下载并填写到配置文件中,具体查看方式见上述文档
4 changes: 2 additions & 2 deletions web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
"web:serve": "vitepress serve"
},
"devDependencies": {
"@types/node": "^22.9.2",
"@types/node": "^22.10.2",
"fast-glob": "^3.3.2",
"sass": "^1.81.0",
"sass": "^1.83.0",
"vite": "^5.4.11",
"vitepress": "^1.5.0",
"vue": "^3.5.13"
Expand Down
Loading
Loading