| | |
| | | import com.java110.dto.app.AppDto; |
| | | import com.java110.dto.fee.FeeDto; |
| | | import com.java110.dto.owner.OwnerAppUserDto; |
| | | import com.java110.dto.payment.NotifyPaymentOrderDto; |
| | | import com.java110.dto.payment.PaymentOrderDto; |
| | | import com.java110.dto.smallWeChat.SmallWeChatDto; |
| | | import com.java110.intf.fee.ITempCarFeeCreateOrderV1InnerServiceSMO; |
| | |
| | | import com.java110.intf.user.IOwnerAppUserInnerServiceSMO; |
| | | import com.java110.utils.cache.CommonCache; |
| | | import com.java110.utils.cache.MappingCache; |
| | | import com.java110.utils.cache.UrlCache; |
| | | import com.java110.utils.constant.MappingConstant; |
| | | import com.java110.utils.constant.WechatConstant; |
| | | import com.java110.utils.exception.CmdException; |
| | | import com.java110.utils.util.*; |
| | |
| | | String appId = context.getReqHeaders().get("app-id"); |
| | | String userId = context.getReqHeaders().get("user-id"); |
| | | String communityId = reqJson.getString("communityId"); |
| | | String notifyUrl = MappingCache.getValue("OWNER_WECHAT_URL") + "/app/payment/notify/common/992020011134400001"; |
| | | String notifyUrl = UrlCache.getOwnerUrl()+ "/app/payment/notify/common/992020011134400001/"+smallWeChatDto.getObjId(); |
| | | |
| | | String openId = reqJson.getString("openId"); |
| | | |
| | |
| | | logger.debug("【小程序支付】 统一下单开始, 订单编号=" + paymentOrderDto.getOrderId()); |
| | | SortedMap<String, String> resultMap = new TreeMap<String, String>(); |
| | | //生成支付金额,开发环境处理支付金额数到0.01、0.02、0.03元 |
| | | double payAmount = PayUtil.getPayAmountByEnv(MappingCache.getValue("HC_ENV"), paymentOrderDto.getMoney()); |
| | | double payAmount = PayUtil.getPayAmountByEnv(MappingCache.getValue(MappingConstant.ENV_DOMAIN,"HC_ENV"), paymentOrderDto.getMoney()); |
| | | //添加或更新支付记录(参数跟进自己业务需求添加) |
| | | |
| | | ResultVo resMap = null; |
| | |
| | | |
| | | |
| | | @Override |
| | | public PaymentOrderDto java110NotifyPayment(String param) { |
| | | JSONObject reqJson = JSONObject.parseObject(param); |
| | | public PaymentOrderDto java110NotifyPayment(NotifyPaymentOrderDto notifyPaymentOrderDto) { |
| | | JSONObject reqJson = JSONObject.parseObject(notifyPaymentOrderDto.getParam()); |
| | | |
| | | PaymentOrderDto paymentOrderDto = new PaymentOrderDto(); |
| | | Assert.jsonObjectHaveKey(reqJson, "out_trade_no", "请求报文中未包含订单信息"); |
| | |
| | | smallWeChatDto = new SmallWeChatDto(); |
| | | smallWeChatDto.setAppId(MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "appId")); |
| | | smallWeChatDto.setAppSecret(MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "appSecret")); |
| | | smallWeChatDto.setMchId(MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "mchId")); |
| | | smallWeChatDto.setPayPassword(MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "key")); |
| | | smallWeChatDto.setMchId(MappingCache.getValue(MappingConstant.WECHAT_STORE_DOMAIN, "mchId")); |
| | | smallWeChatDto.setPayPassword(MappingCache.getValue(MappingConstant.WECHAT_STORE_DOMAIN, "key")); |
| | | smallWeChatDto.setObjId(paramIn.getString("communityId")); |
| | | return smallWeChatDto; |
| | | } |
| | | |