订单信息
This commit is contained in:
parent
f6c574e4aa
commit
217c669407
@ -44,6 +44,9 @@ public class Const {
|
||||
//机构公钥
|
||||
public static String INS_PUBLIC_KEY="";
|
||||
|
||||
//富友回调公钥
|
||||
public static String INS_PUBLIC_KEYS="MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCj1SsMt4S9SMcNpXrcQ9ET4hHdX0UX/1RTdD9GzxzSDwTEsLQuUNaX0VP8NQ7NWvMdgCYnST74oV81ht0GQd3aax6fyXjDETYC5tq0sHkJxwtiynTcssPBjM2LipTeY6Sv8cUS1MPnvRX2Cs1RXkB8ZdUp9dCaNnTxFOPJGB1E4wIDAQAB";
|
||||
|
||||
//异步通知(回调地址)
|
||||
// public static String notify_url = "https://www.fuint.cn/fuint-application/clientApi/pay/aliPayCallback";
|
||||
public static String notify_url = "https://8q4f124343.yicp.fun/api/fyPay/notify";
|
||||
@ -64,7 +67,15 @@ public class Const {
|
||||
public static String fuiou_28_url = "https://fundwx.fuiou.com/queryFeeAmt";
|
||||
//提现
|
||||
public static String fuiou_29_url = "https://fundwx.fuiou.com/withdraw";
|
||||
|
||||
//查询
|
||||
public static String fuiou_30_url = "https://fundwx.fuiou.com/commonQuery";
|
||||
|
||||
// 生产地址 扫码
|
||||
public static String fuiou_31_url = "https://spay-cloud.fuioupay.com/micropay";
|
||||
//生产地址 公众号/服务窗/小程序统一下单
|
||||
public static String fuiou_32_url = "https://spay-cloud.fuioupay.com/wxPreCreate";
|
||||
//生产地址 退款
|
||||
public static String fuiou_33_url = "https://spay-cloud.fuioupay.com/commonRefund";
|
||||
//生产地址 查询
|
||||
public static String fuiou_34_url = "https://spay-cloud.fuioupay.com/commonQuery";
|
||||
}
|
||||
|
@ -27,6 +27,7 @@ public class Message {
|
||||
root.addElement(key).addText(value);
|
||||
}
|
||||
String reqBody = "<?xml version=\"1.0\" encoding=\"GBK\" standalone=\"yes\"?>" + doc.getRootElement().asXML();
|
||||
System.out.println(reqBody);
|
||||
reqBody = URLEncoder.encode(reqBody, Const.charset);
|
||||
return reqBody;
|
||||
}
|
||||
|
@ -78,12 +78,13 @@ public class FyPayServiceImpl implements FyPayService {
|
||||
// 请求报文
|
||||
String reqBody = Message.requestMsg(map);
|
||||
// 响应报文
|
||||
String rspXml = Message.responseMsg(reqBody,Const.fuiou_22_url);
|
||||
String rspXml = Message.responseMsg(reqBody,Const.fuiou_31_url);
|
||||
|
||||
//响应报文验签
|
||||
Map<String, String> resMap = Utils.xmlStr2Map(rspXml);
|
||||
|
||||
String str = resMap.get("sign");
|
||||
System.out.println(Utils.verifySign(resMap, str));
|
||||
if (Utils.verifySign(resMap, str)){
|
||||
ThreadUtil.execAsync(() -> {
|
||||
Timer timer = new Timer();
|
||||
@ -144,7 +145,7 @@ public class FyPayServiceImpl implements FyPayService {
|
||||
// 请求报文
|
||||
String reqBody = Message.requestMsg(map);
|
||||
// 响应报文
|
||||
String rspXml = Message.responseMsg(reqBody,Const.fuiou_30_url);
|
||||
String rspXml = Message.responseMsg(reqBody,Const.fuiou_34_url);
|
||||
|
||||
//响应报文验签
|
||||
Map<String, String> reqMap = Utils.xmlStr2Map(rspXml);
|
||||
@ -342,7 +343,7 @@ public class FyPayServiceImpl implements FyPayService {
|
||||
// 请求报文
|
||||
String reqBody = Message.requestMsg(map);
|
||||
// 响应报文
|
||||
String rspXml = Message.responseMsg(reqBody,Const.fuiou_23_url);
|
||||
String rspXml = Message.responseMsg(reqBody,Const.fuiou_32_url);
|
||||
//响应报文验签
|
||||
Map<String, String> resMap = Utils.xmlStr2Map(rspXml);
|
||||
|
||||
@ -375,7 +376,7 @@ public class FyPayServiceImpl implements FyPayService {
|
||||
// 请求报文
|
||||
String reqBody = Message.requestMsg(map);
|
||||
// 响应报文
|
||||
String rspXml = Message.responseMsg(reqBody,Const.fuiou_24_url);
|
||||
String rspXml = Message.responseMsg(reqBody,Const.fuiou_33_url);
|
||||
|
||||
//响应报文验签
|
||||
Map<String, String> resMap = Utils.xmlStr2Map(rspXml);
|
||||
|
@ -103,8 +103,8 @@ public class Utils {
|
||||
Map<String, String> mapNew = paraFilter(map);
|
||||
|
||||
String preSignStr = createLinkString(mapNew);
|
||||
|
||||
return Sign.verify(preSignStr.getBytes(Const.charset), Const.INS_PUBLIC_KEY, sign);
|
||||
// System.out.println(Sign.verify(preSignStr.getBytes(Const.charset), Const.INS_PUBLIC_KEY, sign));
|
||||
return Sign.verify(preSignStr.getBytes(Const.charset), Const.INS_PUBLIC_KEYS, sign);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -91,7 +91,7 @@ public class HangBillServiceImpl extends ServiceImpl<HangBillMapper, HangBill> i
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
|
||||
String timestamp = dateFormat.format(new Date());
|
||||
String randomString = UUID.randomUUID().toString().replace("-","").substring(0,6);
|
||||
String orderNo = timestamp+randomString;
|
||||
String orderNo = "2345"+timestamp+randomString;
|
||||
Integer staffId = nowAccountInfo.getStaffId();
|
||||
|
||||
hangBill.setStaffId(staffId);
|
||||
|
@ -214,7 +214,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
|
||||
String timestamp = dateFormat.format(new Date());
|
||||
String randomString = UUID.randomUUID().toString().replace("-","").substring(0,6);
|
||||
String orderNo = timestamp+randomString;
|
||||
String orderNo = "2345"+timestamp+randomString;
|
||||
|
||||
|
||||
Map<String,Object> orders = new HashMap<>();
|
||||
@ -390,7 +390,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
|
||||
String timestamp = dateFormat.format(new Date());
|
||||
String randomString = UUID.randomUUID().toString().replace("-","").substring(0,6);
|
||||
String orderNo = timestamp+randomString;
|
||||
String orderNo = "2345"+timestamp+randomString;
|
||||
|
||||
// 添加油品订单信息
|
||||
oilOrder.setOrderNo(orderNo);
|
||||
|
@ -973,7 +973,7 @@
|
||||
// 商品订单
|
||||
goodsOrder:"",
|
||||
// 支付方式
|
||||
payType:"CASH",
|
||||
payType:"WECHAT",
|
||||
// 油品订单金额
|
||||
oilAmount:0,
|
||||
// 商品订单金额
|
||||
|
Loading…
Reference in New Issue
Block a user