Example #1
0
 /**
  * 获取用户密钥
  *
  * @param userName 用户名
  * @return 密钥
  */
 private String getSecret(String userName) {
   try {
     Member member = memberService.get(userName);
     return DESUtil.decryptToString(member.getToken(), userName);
   } catch (Exception ex) {
     callbackLogger.warn("获取用户密钥失败,userName:{}, exMsg:{}", userName, ex.getMessage());
     return null;
   }
 }
Example #2
0
 public static void main(String[] args) {
   Map<String, Object> paramMap = new HashMap<>();
   paramMap.put("orderId", "D000000000913182");
   paramMap.put("transId", "20151203155117187130810888661617");
   paramMap.put("status", 3);
   paramMap.put(
       "failedReason",
       "8888:产品200M全国流量订购失败。失败描述:[INDETERMINATE]Utility.cpp:207,CRMException-300263: TCS_ChangeServiceReg执行异常:[INDETERMINATE]TradeCheckTradeSuperLimit.cpp:403,CRMException-300263: 特殊限制判断:用户必选3种服务EDGE+服务,接入2G网络,3G上网服务 中的一个才能继续受理业务!");
   String sign =
       OpenSign.getSign(
           paramMap,
           DESUtil.decryptToString(
               "6fugMFC5BEB92yolInanfVN0kZ7ztdAXmMghhv6j7dBW1DIxbSYX9Q==", "sd_yafeida"));
   System.out.println(sign);
 }