支付相关
This commit is contained in:
parent
5c73d31551
commit
763c6ce174
@ -61,7 +61,7 @@ public class WechatPayConfig {
|
||||
/**
|
||||
* 汽修通知回调地址
|
||||
*/
|
||||
private String repairNotifyUrl="https://www.nuoyunr.com/admin-api/repairPayApi/payNotify";
|
||||
private String repairNotifyUrl="https://www.nuoyunr.com/userClient/pay/payNotify";
|
||||
/**
|
||||
* API 证书中的 key.pem
|
||||
*/
|
||||
|
@ -41,7 +41,9 @@ public class RepairPayApi {
|
||||
}
|
||||
private final ReentrantLock lock = new ReentrantLock();
|
||||
@PostMapping("/payNotify")
|
||||
@TenantIgnore
|
||||
public Map<String, String> payNotify(@RequestBody JSONObject jsonObject) {
|
||||
System.out.println("进入支付回调"+jsonObject.toString());
|
||||
try {
|
||||
String key = wechatPayConfig.getApiV3Key();
|
||||
String json = jsonObject.toString();
|
||||
@ -51,6 +53,7 @@ public class RepairPayApi {
|
||||
String decryptData = new AesUtil(key.getBytes(StandardCharsets.UTF_8)).decryptToString(associated_data.getBytes(StandardCharsets.UTF_8), nonce.getBytes(StandardCharsets.UTF_8), ciphertext);
|
||||
//验签成功
|
||||
JSONObject decryptDataObj = JSONObject.parseObject(decryptData, JSONObject.class);
|
||||
System.out.println("进入支付回调"+decryptDataObj.toString());
|
||||
if(lock.tryLock()) {
|
||||
try {
|
||||
String orderNo = decryptDataObj.get("out_trade_no").toString();
|
||||
@ -62,8 +65,8 @@ public class RepairPayApi {
|
||||
lock.unlock();
|
||||
}
|
||||
}
|
||||
}catch (Exception ignored){
|
||||
|
||||
}catch (Exception e){
|
||||
System.out.println("支付回调失败"+e.getMessage());
|
||||
}
|
||||
|
||||
Map<String, String> res = new HashMap<>();
|
||||
|
@ -185,10 +185,10 @@ debug: false
|
||||
--- #################### 微信公众号、小程序相关配置 ####################
|
||||
wx:
|
||||
mp: # 公众号配置(必填),参见 https://github.com/Wechat-Group/WxJava/blob/develop/spring-boot-starters/wx-java-mp-spring-boot-starter/README.md 文档
|
||||
# app-id: wx041349c6f39b268b # 测试号(牛希尧提供的)
|
||||
# secret: 5abee519483bc9f8cb37ce280e814bd0
|
||||
app-id: wx5b23ba7a5589ecbb # 测试号(自己的)
|
||||
secret: 2a7b3b20c537e52e74afd395eb85f61f
|
||||
# app-id: wx8653afe16dffec37 # 蓝安
|
||||
# secret: ab94673dd0cca78abd0a453d0aac9f98
|
||||
app-id: wxb1f71e5e0c5f9ee7 # 点亮
|
||||
secret: 2e9864a6b224feb6fba4ab73b70212cd
|
||||
# app-id: wxa69ab825b163be19 # 测试号(Kongdy 提供的)
|
||||
# secret: bd4f9fab889591b62aeac0d7b8d8b4a0
|
||||
# 存储配置,解决 AccessToken 的跨节点的共享
|
||||
@ -197,12 +197,8 @@ wx:
|
||||
key-prefix: wx # Redis Key 的前缀
|
||||
http-client-type: HttpClient # 采用 HttpClient 请求微信公众号平台
|
||||
miniapp: # 小程序配置(必填),参见 https://github.com/Wechat-Group/WxJava/blob/develop/spring-boot-starters/wx-java-miniapp-spring-boot-starter/README.md 文档
|
||||
# appid: wx62056c0d5e8db250 # 测试号(牛希尧提供的)
|
||||
# secret: 333ae72f41552af1e998fe1f54e1584a
|
||||
appid: wx63c280fe3248a3e7 # wenhualian的接口测试号
|
||||
secret: 6f270509224a7ae1296bbf1c8cb97aed
|
||||
# appid: wxc4598c446f8a9cb3 # 测试号(Kongdy 提供的)
|
||||
# secret: 4a1a04e07f6a4a0751b39c3064a92c8b
|
||||
appid: wxb1f71e5e0c5f9ee7 # wenhualian的接口测试号
|
||||
secret: 2e9864a6b224feb6fba4ab73b70212cd
|
||||
config-storage:
|
||||
type: RedisTemplate # 采用 RedisTemplate 操作 Redis,会自动从 Spring 中获取
|
||||
key-prefix: wa # Redis Key 的前缀
|
||||
|
@ -284,6 +284,7 @@ yudao:
|
||||
- /admin-api/system/dict-data/type
|
||||
- /userClient/pay/**
|
||||
- /userClient/weChat/**
|
||||
- /userClient/**
|
||||
ignore-tables:
|
||||
- system_tenant
|
||||
- system_tenant_package
|
||||
|
Loading…
Reference in New Issue
Block a user