添加快捷支付

This commit is contained in:
韩鹏辉
2024-05-20 09:59:15 +08:00
parent 776e9076da
commit cd913643a5
10 changed files with 57 additions and 25 deletions

View File

@@ -27,6 +27,8 @@ public class ThirdPayService {
private static String trade="/api/open/query/trade";
private static String refund="/api/open/order/refund";
/**
* 被扫接口
* @param url
@@ -183,7 +185,7 @@ public class ThirdPayService {
param.setSign(sign);
String reqbody = JSONUtil.toJSONString(param);
log.info("请求参数:{}", reqbody);
String response = HttpRequest.post(url.concat(trade)).body(reqbody).execute().body();
String response = HttpRequest.post(url.concat(refund)).body(reqbody).execute().body();
log.info("返回结果:{}", response);
PublicResp<OrderReturnResp> resp =JSONUtil.parseJSONStr2T(response,PublicResp.class);
resp.setObjData(JSONUtil.parseJSONStr2T(resp.getBizData(),OrderReturnResp.class));
@@ -285,7 +287,6 @@ public class ThirdPayService {
if(value==null){
continue;
}
map.put(field.getName(), value);
}
return map;
@@ -295,6 +296,6 @@ public class ThirdPayService {
public static void main(String[] args) {
// mainScan("https://paymentapi.sxczgkj.cn","6639fdc9fdf6f35856a23b3c", "测试支付", "测试支付", 1L, "wx212769170d2c6b2a", "131112206836873461", "CZ".concat(String.valueOf(System.currentTimeMillis())), "S2405103298", "https://", "fEu7tJgqaoPCA5QevafnSHfqHtO7rWcvhyfA0ltuab7rbpgOlab7CFCmqxMIbssUvbOnFKLdQqW5xUvhzb7FoxJNMAkIf2KDzlgDl6Diw1oBq56agSAFHhgYr3bLxXXI");
new ThirdPayService(). mainScan("https://paymentapi.sxczgkj.cn","66446e41fdf63f75318ed3f8", "测试支付", "测试支付", 1L, "wxd88fffa983758a30", "131112206836873461", "CZ".concat(String.valueOf(System.currentTimeMillis())), "S2405154485", "https://cashierclient.sxczgkj.cn/cashier-client/notify/notifyPay", "vHtBsHhPc3L7dXDBSKGgB5oso061xqFJcmmvfZ7DxBdZYpJHeI9a7OdqB0tzrLidPCpcWHxrKZ5AuZIPPCrTa8RwUsHS9atzzucIwspTKGcwOXINU1gUacxAKkhqTyT0");
}
}