gpt4 book ai didi

org.xxpay.common.util.XXPayUtil类的使用及代码示例

转载 作者:知者 更新时间:2024-03-19 07:40:40 27 4
gpt4 key购买 nike

本文整理了Java中org.xxpay.common.util.XXPayUtil类的一些代码示例,展示了XXPayUtil类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XXPayUtil类的具体详情如下:
包路径:org.xxpay.common.util.XXPayUtil
类名称:XXPayUtil

XXPayUtil介绍

暂无

代码示例

代码示例来源: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("###### 商户查询订单处理完成 ######");
  return XXPayUtil.makeRetData(map, payContext.getString("resKey"));
}catch (Exception e) {
  _log.error(e, "");
  return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, "支付中心系统异常", null, null));

代码示例来源:origin: jmdhappy/xxpay-master

boolean verifyFlag = XXPayUtil.verifyPaySign(params, reqKey);
if(!verifyFlag) {
  errorMessage = "Verify XX pay sign failed.";

代码示例来源:origin: jmdhappy/xxpay-master

static void addMchInfo() {
  JSONObject params = new JSONObject();
  params.put("mchId", "20001226");
  params.put("name", "百年树丁");
  params.put("type", "1");
  params.put("reqKey", "298332323231231313");
  params.put("resKey", "883435353534543534");
  String reqData = "params=" + params.toJSONString();
  System.out.println("请求支付中心添加商户接口,请求数据:" + reqData);
  String url = baseUrl + "/mch/add?";
  String result = XXPayUtil.call4Post(url + reqData);
  System.out.println("请求支付中心添加商户接口,响应数据:" + result);
}

代码示例来源: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

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

_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

return null;
String param = XXPayUtil.genUrlParams(paramMap);
StringBuffer sb = new StringBuffer();
sb.append(transOrder.getNotifyUrl()).append("?").append(param);

代码示例来源: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

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

_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

return null;
String param = XXPayUtil.genUrlParams(paramMap);
StringBuffer sb = new StringBuffer();
sb.append(payOrder.getNotifyUrl()).append("?").append(param);

代码示例来源: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

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

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

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

boolean verifyFlag = XXPayUtil.verifyPaySign(params, reqKey);
if(!verifyFlag) {
  errorMessage = "Verify XX pay sign failed.";

代码示例来源:origin: jmdhappy/xxpay-master

return null;
String param = XXPayUtil.genUrlParams(paramMap);
StringBuffer sb = new StringBuffer();
sb.append(payOrder.getNotifyUrl()).append("?").append(param);

代码示例来源:origin: jmdhappy/xxpay-master

static void addPayChannel() {
  JSONObject params = new JSONObject();
  params.put("channelId", "WX_NATIVE");//WX_NATIVE
  params.put("channelName", "WX");//WX
  params.put("channelMchId", "1481721182");
  params.put("mchId", "20001223");
  params.put("param","{\"mchId\":\"1481721182\", \"appId\":\"wx077cb62e341f8a5c\", \"key\":\"***\", \"certLocalPath\":\"wx/1481721182_cert.p12\", \"certPassword\":\"1481721182\", \"desc\":\"xxpay_shop-native(xxpay扫码支付)\"}");
  params.put("remark", "微信扫码支付");
  String reqData = "params=" + params.toJSONString();
  System.out.println("请求支付中心添加渠道接口,请求数据:" + reqData);
  String url = baseUrl + "/channel/add?";
  String result = XXPayUtil.call4Post(url + reqData);
  System.out.println("请求支付中心添加渠道接口,响应数据:" + result);
}

代码示例来源: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 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);
}

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com