- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.xxpay.common.util.XXPayUtil.makeRetMap()
方法的一些代码示例,展示了XXPayUtil.makeRetMap()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XXPayUtil.makeRetMap()
方法的具体详情如下:
包路径:org.xxpay.common.util.XXPayUtil
类名称:XXPayUtil
方法名:makeRetMap
暂无
代码示例来源:origin: jmdhappy/xxpay-master
public String doWxTransReq(String tradeType, JSONObject payOrder, String resKey) {
Map<String,Object> paramMap = new HashMap<>();
paramMap.put("tradeType", tradeType);
paramMap.put("payOrder", payOrder);
String jsonParam = RpcUtil.createBaseParam(paramMap);
Map<String, Object> result = rpcCommonService.rpcPayChannel4WxService.doWxPayReq(jsonParam);
String s = RpcUtil.mkRet(result);
if(s == null) {
return XXPayUtil.makeRetData(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_SUCCESS, "", PayConstant.RETURN_VALUE_FAIL, "0111", "调用微信支付失败"), resKey);
}
Map<String, Object> map = XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_SUCCESS, "", PayConstant.RETURN_VALUE_SUCCESS, null);
map.putAll((Map) result.get("bizResult"));
return XXPayUtil.makeRetData(map, resKey);
}
代码示例来源:origin: jmdhappy/xxpay-master
public String doWxRefundReq(String tradeType, JSONObject refundOrder, String resKey) {
Map<String,Object> paramMap = new HashMap<>();
paramMap.put("tradeType", tradeType);
paramMap.put("refundOrder", refundOrder);
String jsonParam = RpcUtil.createBaseParam(paramMap);
Map<String, Object> result = rpcCommonService.rpcPayChannel4AliService.doAliRefundReq(jsonParam);
String s = RpcUtil.mkRet(result);
if(s == null) {
return XXPayUtil.makeRetData(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_SUCCESS, "", PayConstant.RETURN_VALUE_FAIL, "0111", "调用微信支付失败"), resKey);
}
Map<String, Object> map = XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_SUCCESS, "", PayConstant.RETURN_VALUE_SUCCESS, null);
map.putAll((Map) result.get("bizResult"));
return XXPayUtil.makeRetData(map, resKey);
}
代码示例来源:origin: jmdhappy/xxpay-master
public String doWxPayReq(String tradeType, JSONObject payOrder, String resKey) {
Map<String,Object> paramMap = new HashMap<>();
paramMap.put("tradeType", tradeType);
paramMap.put("payOrder", payOrder);
String jsonParam = RpcUtil.createBaseParam(paramMap);
Map<String, Object> result = rpcCommonService.rpcPayChannel4WxService.doWxPayReq(jsonParam);
String s = RpcUtil.mkRet(result);
if(s == null) {
return XXPayUtil.makeRetData(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_SUCCESS, "", PayConstant.RETURN_VALUE_FAIL, "0111", "调用微信支付失败"), resKey);
}
Map<String, Object> map = XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_SUCCESS, "", PayConstant.RETURN_VALUE_SUCCESS, null);
map.putAll((Map) result.get("bizResult"));
return XXPayUtil.makeRetData(map, resKey);
}
代码示例来源:origin: jmdhappy/xxpay-master
public String doWxPayReq(String tradeType, JSONObject payOrder, String resKey) {
Map<String,Object> paramMap = new HashMap<>();
paramMap.put("tradeType", tradeType);
paramMap.put("payOrder", payOrder);
String jsonParam = RpcUtil.createBaseParam(paramMap);
Map<String, Object> result = payChannel4WxService.doWxPayReq(jsonParam);
String s = RpcUtil.mkRet(result);
if(s == null) {
return XXPayUtil.makeRetData(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_SUCCESS, "", PayConstant.RETURN_VALUE_FAIL, "0111", "调用微信支付失败"), resKey);
}
Map<String, Object> map = XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_SUCCESS, "", PayConstant.RETURN_VALUE_SUCCESS, null);
map.putAll((Map) result.get("bizResult"));
return XXPayUtil.makeRetData(map, resKey);
}
代码示例来源:origin: jmdhappy/xxpay-master
if (!"success".equalsIgnoreCase(errorMessage)) {
_log.warn(errorMessage);
return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, errorMessage, null, null));
_log.info("{}查询支付订单,结果:{}", logPrefix, payOrder);
if (payOrder == null) {
return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, "支付订单不存在", null, null));
Map<String, Object> map = XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_SUCCESS, "", PayConstant.RETURN_VALUE_SUCCESS, null);
map.put("result", payOrder);
_log.info("###### 商户查询订单处理完成 ######");
}catch (Exception e) {
_log.error(e, "");
return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, "支付中心系统异常", null, null));
代码示例来源:origin: jmdhappy/xxpay-master
if (!"success".equalsIgnoreCase(errorMessage)) {
_log.warn(errorMessage);
return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, errorMessage, null, null));
_log.info("{}查询支付订单,结果:{}", logPrefix, payOrder);
if (payOrder == null) {
return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, "支付订单不存在", null, null));
Map<String, Object> map = XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_SUCCESS, "", PayConstant.RETURN_VALUE_SUCCESS, null);
map.put("result", payOrder);
_log.info("###### 商户查询订单处理完成 ######");
}catch (Exception e) {
_log.error(e, "");
return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, "支付中心系统异常", null, null));
代码示例来源:origin: jmdhappy/xxpay-master
if (object instanceof String) {
_log.info("{}参数校验不通过:{}", logPrefix, object);
return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, object.toString(), null, null));
if(refundOrder == null) return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, "支付中心退款失败", null, null));
int result = refundOrderService.create(refundOrder);
_log.info("{}创建退款订单,结果:{}", logPrefix, result);
if(result != 1) {
return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, "创建退款订单失败", null, null));
_log.info("{}发送转账任务完成,transOrderId={}", logPrefix, transOrderId);
Map<String, Object> map = XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_SUCCESS, "", PayConstant.RETURN_VALUE_SUCCESS, null);
map.put("refundOrderId", refundOrder.getString("refundOrderId"));
return XXPayUtil.makeRetData(map, refundContext.getString("resKey"));
}catch (Exception e) {
_log.error(e, "");
return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, "支付中心系统异常", null, null));
代码示例来源:origin: jmdhappy/xxpay-master
if (object instanceof String) {
_log.info("{}参数校验不通过:{}", logPrefix, object);
return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, object.toString(), null, null));
if(transOrder == null) return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, "支付中心转账失败", null, null));
int result = transOrderService.create(transOrder);
_log.info("{}创建转账订单,结果:{}", logPrefix, result);
if(result != 1) {
return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, "创建转账订单失败", null, null));
transOrderService.sendTransNotify(transOrderId, channelName);
_log.info("{}发送转账任务完成,transOrderId={}", logPrefix, transOrderId);
Map<String, Object> map = XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_SUCCESS, "", PayConstant.RETURN_VALUE_SUCCESS, null);
map.put("transOrderId", transOrderId);
return XXPayUtil.makeRetData(map, transContext.getString("resKey"));
}catch (Exception e) {
_log.error(e, "");
return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, "支付中心系统异常", null, null));
代码示例来源:origin: jmdhappy/xxpay-master
public String doAliPayReq(String channelId, JSONObject payOrder, String resKey) {
Map<String,Object> paramMap = new HashMap<>();
paramMap.put("payOrder", payOrder);
String jsonParam = RpcUtil.createBaseParam(paramMap);
Map<String, Object> result;
switch (channelId) {
case PayConstant.PAY_CHANNEL_ALIPAY_MOBILE :
result = rpcCommonService.rpcPayChannel4AliService.doAliPayMobileReq(jsonParam);
break;
case PayConstant.PAY_CHANNEL_ALIPAY_PC :
result = rpcCommonService.rpcPayChannel4AliService.doAliPayPcReq(jsonParam);
break;
case PayConstant.PAY_CHANNEL_ALIPAY_WAP :
result = rpcCommonService.rpcPayChannel4AliService.doAliPayWapReq(jsonParam);
break;
case PayConstant.PAY_CHANNEL_ALIPAY_QR :
result = rpcCommonService.rpcPayChannel4AliService.doAliPayQrReq(jsonParam);
break;
default:
result = null;
break;
}
String s = RpcUtil.mkRet(result);
if(s == null) {
return XXPayUtil.makeRetData(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_SUCCESS, "", PayConstant.RETURN_VALUE_FAIL, "0111", "调用支付宝支付失败"), resKey);
}
Map<String, Object> map = XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_SUCCESS, "", PayConstant.RETURN_VALUE_SUCCESS, null);
map.putAll((Map) result.get("bizResult"));
return XXPayUtil.makeRetData(map, resKey);
}
代码示例来源:origin: jmdhappy/xxpay-master
public String doAliPayReq(String channelId, JSONObject payOrder, String resKey) {
Map<String,Object> paramMap = new HashMap<>();
paramMap.put("payOrder", payOrder);
String jsonParam = RpcUtil.createBaseParam(paramMap);
Map<String, Object> result;
switch (channelId) {
case PayConstant.PAY_CHANNEL_ALIPAY_MOBILE :
result = payChannel4AliService.doAliPayMobileReq(jsonParam);
break;
case PayConstant.PAY_CHANNEL_ALIPAY_PC :
result = payChannel4AliService.doAliPayPcReq(jsonParam);
break;
case PayConstant.PAY_CHANNEL_ALIPAY_WAP :
result = payChannel4AliService.doAliPayWapReq(jsonParam);
break;
case PayConstant.PAY_CHANNEL_ALIPAY_QR :
result = payChannel4AliService.doAliPayQrReq(jsonParam);
break;
default:
result = null;
break;
}
String s = RpcUtil.mkRet(result);
if(s == null) {
return XXPayUtil.makeRetData(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_SUCCESS, "", PayConstant.RETURN_VALUE_FAIL, "0111", "调用支付宝支付失败"), resKey);
}
Map<String, Object> map = XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_SUCCESS, "", PayConstant.RETURN_VALUE_SUCCESS, null);
map.putAll((Map) result.get("bizResult"));
return XXPayUtil.makeRetData(map, resKey);
}
代码示例来源:origin: jmdhappy/xxpay-master
if (object instanceof String) {
_log.info("{}参数校验不通过:{}", logPrefix, object);
return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, object.toString(), null, null));
if(payOrder == null) return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, "支付中心下单失败", null, null));
int result = payOrderService.create(payOrder);
_log.info("{}创建支付订单,结果:{}", logPrefix, result);
if(result != 1) {
return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, "创建支付订单失败", null, null));
return payOrderService.doAliPayReq(channelId, payOrder, payContext.getString("resKey"));
default:
return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, "不支持的支付渠道类型[channelId="+channelId+"]", null, null));
return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, "支付中心系统异常", null, null));
代码示例来源:origin: jmdhappy/xxpay-master
if (!"success".equalsIgnoreCase(errorMessage)) {
_log.warn(errorMessage);
return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, errorMessage, null, null));
_log.info("{}查询支付订单,结果:{}", logPrefix, retObj);
if(!"0000".equals(retObj.getString("code"))) {
return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, retObj.getString("msg"), null, null));
return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, "支付订单不存在", null, null));
Map<String, Object> map = XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_SUCCESS, "", PayConstant.RETURN_VALUE_SUCCESS, null);
map.put("result", payOrder);
_log.info("商户查询订单成功,payOrder={}", payOrder);
}catch (Exception e) {
_log.error(e, "");
return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, "支付中心系统异常", null, null));
代码示例来源:origin: jmdhappy/xxpay-master
if (object instanceof String) {
_log.info("{}参数校验不通过:{}", logPrefix, object);
return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, object.toString(), null, null));
if(payOrder == null) return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, "支付中心下单失败", null, null));
int result = payOrderService.createPayOrder(payOrder);
_log.info("{}创建支付订单,结果:{}", logPrefix, result);
if(result != 1) {
return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, "创建支付订单失败", null, null));
return payOrderService.doAliPayReq(channelId, payOrder, payContext.getString("resKey"));
default:
return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, "不支持的支付渠道类型[channelId="+channelId+"]", null, null));
return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, "支付中心系统异常", null, null));
代码示例来源:origin: jmdhappy/xxpay-master
if (object instanceof String) {
_log.info("{}参数校验不通过:{}", logPrefix, object);
return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, object.toString(), null, null));
if(payOrder == null) return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, "支付中心下单失败", null, null));
String result = payOrderServiceClient.createPayOrder(payOrder.toJSONString());
_log.info("{}创建支付订单,结果:{}", logPrefix, result);
if(StringUtils.isEmpty(result)) {
return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, "创建支付订单失败", null, null));
if(resObj == null || !"1".equals(resObj.getString("result"))) return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, "创建支付订单失败", null, null));
String channelId = payOrder.getString("channelId");
switch (channelId) {
return payOrderServiceClient.doAliPayQrReq(getJsonParam("payOrder", payOrder));
default:
return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, "不支持的支付渠道类型[channelId="+channelId+"]", null, null));
return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, "支付中心系统异常", null, null));
代码示例来源:origin: jmdhappy/xxpay-master
MchInfo mchInfo = mchInfoService.selectMchInfo(mchId);
String resKey = mchInfo == null ? "" : mchInfo.getResKey();
if("".equals(resKey)) return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, "", PayConstant.RETURN_VALUE_FAIL, PayEnum.ERR_0001));
PayChannel payChannel = payChannelService.selectPayChannel(channelId, mchId);
alipayConfig.init(payChannel.getParam());
_log.info("{}生成请求支付宝数据,req={}", logPrefix, alipay_request.getBizModel());
_log.info("###### 商户统一下单处理完成 ######");
Map<String, Object> map = XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_SUCCESS, "", PayConstant.RETURN_VALUE_SUCCESS, null);
map.put("payOrderId", payOrderId);
map.put("payUrl", payUrl);
代码示例来源:origin: jmdhappy/xxpay-master
MchInfo mchInfo = mchInfoService.selectMchInfo(mchId);
String resKey = mchInfo == null ? "" : mchInfo.getResKey();
if("".equals(resKey)) return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, "", PayConstant.RETURN_VALUE_FAIL, PayEnum.ERR_0001));
PayChannel payChannel = payChannelService.selectPayChannel(channelId, mchId);
alipayConfig.init(payChannel.getParam());
_log.info("{}生成请求支付宝数据,payParams={}", logPrefix, payParams);
_log.info("###### 商户统一下单处理完成 ######");
Map<String, Object> map = XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_SUCCESS, "", PayConstant.RETURN_VALUE_SUCCESS, null);
map.put("payOrderId", payOrderId);
map.put("payParams", payParams);
代码示例来源:origin: jmdhappy/xxpay-master
_log.info("{}生成请求支付宝数据,req={}", logPrefix, alipay_request.getBizModel());
_log.info("###### 商户统一下单处理完成 ######");
Map<String, Object> map = XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_SUCCESS, "", PayConstant.RETURN_VALUE_SUCCESS, null);
map.put("payOrderId", payOrderId);
map.put("payUrl", payUrl);
代码示例来源:origin: jmdhappy/xxpay-master
model.setOrderId(transOrder.getChannelOrderNo());
request.setBizModel(model);
Map<String, Object> map = XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_SUCCESS, "", PayConstant.RETURN_VALUE_SUCCESS, null);
map.put("transOrderId", transOrderId);
try {
代码示例来源:origin: jmdhappy/xxpay-master
_log.info("{}生成请求支付宝数据,payParams={}", logPrefix, payParams);
_log.info("###### 商户统一下单处理完成 ######");
Map<String, Object> map = XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_SUCCESS, "", PayConstant.RETURN_VALUE_SUCCESS, null);
map.put("payOrderId", payOrderId);
map.put("payParams", payParams);
代码示例来源:origin: jmdhappy/xxpay-master
_log.info("{}生成请求支付宝数据,payParams={}", logPrefix, payParams);
_log.info("###### 商户统一下单处理完成 ######");
Map<String, Object> map = XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_SUCCESS, "", PayConstant.RETURN_VALUE_SUCCESS, null);
map.put("payOrderId", payOrderId);
map.put("payParams", payParams);
本文整理了Java中org.xxpay.common.util.XXPayUtil.makeRetMap()方法的一些代码示例,展示了XXPayUtil.makeRetMap()的具体用法。这些代码示
我是一名优秀的程序员,十分优秀!