| | |
| | | import com.java110.core.context.ICmdDataFlowContext; |
| | | import com.java110.core.event.cmd.Cmd; |
| | | import com.java110.core.event.cmd.CmdEvent; |
| | | import com.java110.core.factory.CallApiServiceFactory; |
| | | import com.java110.core.factory.CommunitySettingFactory; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.core.factory.WechatFactory; |
| | |
| | | paymentOrderDto.setUserId(userId); |
| | | reqJson.put("money", paymentOrderDto.getMoney()); |
| | | |
| | | String token = GenerateCodeFactory.getUUID(); |
| | | |
| | | // redis 中 保存 请求参数 |
| | | CommonCache.setValue("nativeQrcodePayment_" + token, reqJson.toJSONString(), CommonCache.PAY_DEFAULT_EXPIRE_TIME); |
| | | CommonCache.setValue("nativeQrcodePayment_" + paymentOrderDto.getOrderId(), reqJson.toJSONString(), CommonCache.PAY_DEFAULT_EXPIRE_TIME); |
| | | JSONObject result = new JSONObject(); |
| | | |
| | | String notifyUrl = UrlCache.getOwnerUrl() + "/app/payment/notify/wechat/"+appId+"/"+reqJson.getString("paymentPoolId"); |
| | | String notifyUrl = UrlCache.getOwnerUrl() + "/app/payment/notify/nativeWechat/"+appId+"/"+reqJson.getString("paymentPoolId"); |
| | | |
| | | // |
| | | // |
| | |
| | | paramMap.put("mchnt_cd", smallWeChatDto.getMchId()); // 富友分配给二级商户的商户号 |
| | | paramMap.put("random_str", PayUtil.makeUUID(32)); |
| | | paramMap.put("order_amt", (int)(paymentOrderDto.getMoney()*100)); |
| | | String generatorId = GenerateCodeFactory.getGeneratorId("81"); |
| | | paramMap.put("mchnt_order_no", smallWeChatDto.getOrderPre() + generatorId); |
| | | paramMap.put("mchnt_order_no", smallWeChatDto.getOrderPre() + paymentOrderDto.getOrderId()); |
| | | paramMap.put("txn_begin_ts", DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_DEFAULT)); |
| | | paramMap.put("goods_des", systemName + "测试"); |
| | | paramMap.put("term_id", "abcdefgh"); |
| | |
| | | , HttpMethod.POST, httpEntity, String.class); |
| | | if(JSONObject.parseObject(responseEntity.getBody()).get("result_msg").equals("SUCCESS")){ |
| | | result.put("codeUrl", JSONObject.parseObject(responseEntity.getBody()).get("qr_code")); |
| | | result.put("orderId", paymentOrderDto.getOrderId()); |
| | | ResponseEntity<String> responseEntity2 = ResultVo.createResponseEntity(result); |
| | | logger.debug("调用支付厂家返回,{}", responseEntity2); |
| | | context.setResponseEntity(responseEntity2); |