提交 2d30ef1d 编写于 作者: J Javen205

📝 编写文档

上级 370339db
......@@ -16,7 +16,7 @@
- mchId: 微信支付商户号
- partnerKey: API 密钥,微信商户后台配置
- certPath: `apiclient_cert.p12` 证书绝对路径,在微信商户后台下载
- domain: 外网访问项目的域名,支付通知中会使用
- domain: 外网访问项目的域名,支付通知、回调中会使用
:::
## 服务商模式
......@@ -30,11 +30,26 @@
- subMchId: 子商户号
- partnerKey: API 密钥,服务商微信商户后台配置
- certPath: `apiclient_cert.p12` 证书绝对路径,在服务商微信商户后台下载
- domain: 外网访问项目的域名,支付通知中会使用
- domain: 外网访问项目的域名,支付通知、回调中会使用
:::
以上配置并非全部必须,可以根据实际情况来决定。服务商模式下接口请求参数
`openid``sub_openid` 可以二选一,如果使用了 `openid` 即使用服务商下的应用进行授权就需要提供服务商的应用配置 `appId` 以及 `appSecret`
反之就使用子商户对应的应用配置
## v3 版本配置说明
::: tip IJPay 中微信支付需要配置的参数如下:
- keyPath= apiclient_key.pem 商户 key 绝对路径
- certPath= capiclient_cert.pem 商户证书绝对路径
- certP12Path= apiclient_cert.p12 备用参数 v3 暂未使用到
- platformCertPath= wx_cert.pem 微信平台证书绝对路径,证书需要通过接口获取,请参考 [v3 文档](../wxpay/api-v3.md)
- mchId= 微信商户号
- apiKey3= Api-v3 密钥
- apiKey= Api 密钥 备用参数 v3 暂未使用到
- domain= 外网访问项目的域名,支付通知、回调中会使用
:::
......@@ -191,4 +191,11 @@ http {
}
}
}
```
\ No newline at end of file
```
## 购买测试服务器
- [阿里云主机低至 2 折](https://promotion.aliyun.com/ntms/yunparter/invite.html?userCode=b1hkzv2x)
- [腾讯云服务器首年 88](https://cloud.tencent.com/act/cps/redirect?redirect=1048&cps_key=a21676d22e4b11a883893d54e158c1d3&from=console)
- [华为云购买享受红利](https://activity.huaweicloud.com/discount_area_v5/index.html?&fromuser=aHcxMTc2NTU3MQ==&utm_source=aHcxMTc2NTU3MQ==&utm_medium=cps&utm_campaign=201905)
\ No newline at end of file
......@@ -33,6 +33,19 @@ String serialNo = certificate.getSerialNumber().toString(16).toUpperCase();
- 使用证书解析工具 [https://myssl.com/cert_decode.html](https://myssl.com/cert_decode.html)
:::
## 创建签名
```java
// 构建签名参数
String buildSignMessage = PayKit.buildSignMessage(method, urlSuffix, timestamp, nonceStr, body);
// 构建签名参数,也可通过列表传入待签名的参数
String buildSignMessage = PayKit.buildSignMessage(ArrayList<String> signMessage)
// 创建签名
String signature = PayKit.createSign(buildSignMessage,keyPath);
// 创建签名,整合版
String signature = PayKit.createSign(ArrayList<String> signMessage, String keyPath)
```
## 构建 Authorization
```java
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册