更新支付配置,添加通知URL并移除不必要的属性
This commit is contained in:
parent
7b8c68f565
commit
0fcd26552b
@ -8,12 +8,11 @@ pay:
|
|||||||
vendorSn: "vendorSn"
|
vendorSn: "vendorSn"
|
||||||
vendorKey: "vendorKey"
|
vendorKey: "vendorKey"
|
||||||
publicKey: classpath:pay/sqb/sqb_public_key.pem
|
publicKey: classpath:pay/sqb/sqb_public_key.pem
|
||||||
|
notifyUrl: http://e2vca6.natappfree.cc/pay/sqb/notify
|
||||||
alipay:
|
alipay:
|
||||||
enabled: false
|
enabled: false
|
||||||
appId: appid
|
appId: appid
|
||||||
# 应用私钥
|
|
||||||
appPrivateKey: classpath:pay/alipay/alipay_private_key.pem
|
appPrivateKey: classpath:pay/alipay/alipay_private_key.pem
|
||||||
# 支付宝公钥
|
|
||||||
alipayPublicKey: classpath:pay/alipay/alipay_public_key.pem
|
alipayPublicKey: classpath:pay/alipay/alipay_public_key.pem
|
||||||
notifyUrl: http://e2vca6.natappfree.cc/alipay/notify
|
notifyUrl: http://e2vca6.natappfree.cc/alipay/notify
|
||||||
wechat:
|
wechat:
|
||||||
|
@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
"properties": [
|
||||||
|
{
|
||||||
|
"name": "pay.alipay.enabled",
|
||||||
|
"type": "java.lang.Boolean",
|
||||||
|
"description": "是否启用支付宝支付"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "pay.alipay.appId",
|
||||||
|
"type": "java.lang.String",
|
||||||
|
"description": "支付宝appid"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "pay.alipay.appPrivateKey",
|
||||||
|
"type": "java.lang.String",
|
||||||
|
"description": "支付宝应用私钥,可以直接用字符串,也可以是基于classpath的文件路径"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "pay.alipay.alipayPublicKey",
|
||||||
|
"type": "java.lang.String",
|
||||||
|
"description": "支付宝应用公钥,可以直接用字符串,也可以是基于classpath的文件路径"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "pay.alipay.notifyUrl",
|
||||||
|
"type": "java.lang.String",
|
||||||
|
"description": "支付宝支付回调地址"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -34,13 +34,7 @@ public class SqbConfig {
|
|||||||
private String vendorKey;
|
private String vendorKey;
|
||||||
|
|
||||||
@Value("${pay.sqb.notifyUrl}")
|
@Value("${pay.sqb.notifyUrl}")
|
||||||
private String defaultNotifyUrl;
|
private String notifyUrl;
|
||||||
|
|
||||||
@Value("${pay.sqb.notifyBaseUrl}")
|
|
||||||
private String defaultNotifyBaseUrl;
|
|
||||||
|
|
||||||
@Value("${pay.sqb.proxy}")
|
|
||||||
private String proxyPath;
|
|
||||||
|
|
||||||
@Value("${pay.sqb.publicKey}")
|
@Value("${pay.sqb.publicKey}")
|
||||||
private String publicKey;
|
private String publicKey;
|
||||||
@ -64,28 +58,12 @@ public class SqbConfig {
|
|||||||
this.publicKey = publicKey;
|
this.publicKey = publicKey;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getDefaultNotifyUrl() {
|
public String getNotifyUrl() {
|
||||||
return defaultNotifyUrl;
|
return notifyUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDefaultNotifyUrl(String defaultNotifyUrl) {
|
public void setNotifyUrl(String notifyUrl) {
|
||||||
this.defaultNotifyUrl = defaultNotifyUrl;
|
this.notifyUrl = notifyUrl;
|
||||||
}
|
|
||||||
|
|
||||||
public String getDefaultNotifyBaseUrl() {
|
|
||||||
return defaultNotifyBaseUrl;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDefaultNotifyBaseUrl(String defaultNotifyBaseUrl) {
|
|
||||||
this.defaultNotifyBaseUrl = defaultNotifyBaseUrl;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getProxyPath() {
|
|
||||||
return proxyPath;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setProxyPath(String proxyPath) {
|
|
||||||
this.proxyPath = proxyPath;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getApiDomain() {
|
public String getApiDomain() {
|
||||||
|
@ -25,7 +25,6 @@ import com.alibaba.fastjson2.JSON;
|
|||||||
import com.alibaba.fastjson2.JSONObject;
|
import com.alibaba.fastjson2.JSONObject;
|
||||||
import com.ruoyi.common.exception.ServiceException;
|
import com.ruoyi.common.exception.ServiceException;
|
||||||
import com.ruoyi.common.utils.SecurityUtils;
|
import com.ruoyi.common.utils.SecurityUtils;
|
||||||
import com.ruoyi.common.utils.ServletUtils;
|
|
||||||
import com.ruoyi.common.utils.http.HttpClientUtil;
|
import com.ruoyi.common.utils.http.HttpClientUtil;
|
||||||
import com.ruoyi.common.utils.sign.Md5Utils;
|
import com.ruoyi.common.utils.sign.Md5Utils;
|
||||||
import com.ruoyi.pay.domain.PayOrder;
|
import com.ruoyi.pay.domain.PayOrder;
|
||||||
@ -202,20 +201,7 @@ public class SQBServiceImpl implements ISqbPayService {
|
|||||||
if (payOrder.getRemark() == null) {
|
if (payOrder.getRemark() == null) {
|
||||||
payOrder.setRemark("支付");
|
payOrder.setRemark("支付");
|
||||||
}
|
}
|
||||||
String orderNotifyUrl;
|
String orderNotifyUrl = sqbConfig.getNotifyUrl();
|
||||||
String defaultNotifyUrl = sqbConfig.getDefaultNotifyUrl();
|
|
||||||
String defaultNotifyBaseUrl = sqbConfig.getDefaultNotifyBaseUrl();
|
|
||||||
String proxyPath = sqbConfig.getProxyPath();
|
|
||||||
if (notifyBaseUrl != null && !notifyBaseUrl.trim().equals("")) {
|
|
||||||
orderNotifyUrl = notifyBaseUrl + defaultNotifyUrl;
|
|
||||||
} else {
|
|
||||||
if (defaultNotifyBaseUrl != null && !defaultNotifyBaseUrl.trim().equals("")) {
|
|
||||||
orderNotifyUrl = defaultNotifyBaseUrl + proxyPath + defaultNotifyUrl;
|
|
||||||
} else {
|
|
||||||
orderNotifyUrl = "http://" + ServletUtils.getRequest().getServerName() + proxyPath + defaultNotifyUrl;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
String param = "" +
|
String param = "" +
|
||||||
"client_sn=" + payOrder.getOrderNumber() +
|
"client_sn=" + payOrder.getOrderNumber() +
|
||||||
"¬ify_url=" + orderNotifyUrl +
|
"¬ify_url=" + orderNotifyUrl +
|
||||||
|
@ -0,0 +1,49 @@
|
|||||||
|
{
|
||||||
|
"properties": [
|
||||||
|
{
|
||||||
|
"name": "pay.sqb.enabled",
|
||||||
|
"type": "java.lang.Boolean",
|
||||||
|
"description": "启用收钱吧支付"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "pay.sqb.appId",
|
||||||
|
"type": "java.lang.String",
|
||||||
|
"description": "收钱吧appId"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "pay.sqb.apiDomain",
|
||||||
|
"type": "java.lang.String",
|
||||||
|
"description": "收钱吧apiDomain"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "pay.sqb.terminalSn",
|
||||||
|
"type": "java.lang.String",
|
||||||
|
"description": "收钱吧terminalSn"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "pay.sqb.terminalKey",
|
||||||
|
"type": "java.lang.String",
|
||||||
|
"description": "收钱吧terminalKey"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "pay.sqb.vendorSn",
|
||||||
|
"type": "java.lang.String",
|
||||||
|
"description": "收钱吧vendorSn"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "pay.sqb.vendorKey",
|
||||||
|
"type": "java.lang.String",
|
||||||
|
"description": "收钱吧vendorKey"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "pay.sqb.publicKey",
|
||||||
|
"type": "java.lang.String",
|
||||||
|
"description": "收钱吧公钥,可以直接用字符串,也可以是基于classpath的文件路径"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "pay.sqb.notifyUrl",
|
||||||
|
"type": "java.lang.String",
|
||||||
|
"description": "收钱吧支付回调地址"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -0,0 +1,39 @@
|
|||||||
|
{
|
||||||
|
"properties": [
|
||||||
|
{
|
||||||
|
"name": "pay.wechat.enabled",
|
||||||
|
"type": "java.lang.Boolean",
|
||||||
|
"description": "是否启用微信支付"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "pay.wechat.appId",
|
||||||
|
"type": "java.lang.String",
|
||||||
|
"description": "微信支付appid"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "pay.wechat.apiV3Key",
|
||||||
|
"type": "java.lang.String",
|
||||||
|
"description": "微信支付apiV3Key"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "pay.wechat.privateKeyPath",
|
||||||
|
"type": "java.lang.String",
|
||||||
|
"description": "微信支付私钥,可以直接用字符串,也可以是基于classpath的文件路径"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "pay.wechat.merchantId",
|
||||||
|
"type": "java.lang.String",
|
||||||
|
"description": "微信支付merchantId"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "pay.wechat.merchantSerialNumber",
|
||||||
|
"type": "java.lang.String",
|
||||||
|
"description": "微信支付merchantSerialNumber"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "pay.wechat.notifyUrl",
|
||||||
|
"type": "java.lang.String",
|
||||||
|
"description": "微信支付回调地址"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user