| | |
| | | |
| | | import cn.hutool.core.date.DatePattern; |
| | | import cn.hutool.core.date.DateUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import cn.hutool.http.HttpRequest; |
| | | import cn.hutool.http.HttpResponse; |
| | | import com.alibaba.fastjson.JSON; |
| | |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.nuvole.hnnx.conf.NxPayConfig; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | |
| | | String palin = null; |
| | | palin = Permutation.sort(bodyMap, "UTF-8"); |
| | | log.info("排序后的字符串:{}", palin); |
| | | if (StringUtils.isNotEmpty(sign)) { |
| | | if (StrUtil.isNotEmpty(sign)) { |
| | | verfiy = verifier.verify(HnnxConstant.ALGORITHM, palin.getBytes(), Hex.toByte(sign), nxPayPublicKey); |
| | | } |
| | | } catch (Exception e) { |
| | |
| | | log.info("----------- 返回值验签 开始 ----------- "); |
| | | boolean verfiy = false; |
| | | try { |
| | | if (StringUtils.isNotEmpty(sign)) { |
| | | if (StrUtil.isNotEmpty(sign)) { |
| | | verfiy = verifier.verify(HnnxConstant.KJ_ALGORITHM, palin.getBytes(), Base64.getDecoder().decode(sign), nxKjPayPublicKey); |
| | | } |
| | | } catch (Exception e) { |
| | |
| | | JSONObject formData = new JSONObject(); |
| | | formData.put("MerNbr", nxPayConfig.getKjMerNbr()); |
| | | //订单编号 |
| | | if (StringUtils.isNotEmpty(orderNbr)) { |
| | | if (StrUtil.isNotEmpty(orderNbr)) { |
| | | formData.put("OrderNbr", orderNbr); |
| | | } |
| | | //起始日期 |
| | | if (StringUtils.isNotEmpty(orderNbr)) { |
| | | if (StrUtil.isNotEmpty(orderNbr)) { |
| | | formData.put("StartDate", startDate); |
| | | } |
| | | //结束日期 |
| | | if (StringUtils.isNotEmpty(orderNbr)) { |
| | | if (StrUtil.isNotEmpty(orderNbr)) { |
| | | formData.put("EndDate", endDate); |
| | | } |
| | | //每页记录数 |