| | |
| | | import com.stylefeng.guns.modular.system.dao.SensitiveWordsMapper; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | | import com.stylefeng.guns.modular.system.util.DateUtil; |
| | | import com.stylefeng.guns.modular.system.util.PayMoneyUtil; |
| | | import com.stylefeng.guns.modular.system.util.ResultUtil; |
| | | import com.stylefeng.guns.modular.system.util.UUIDUtil; |
| | | import com.stylefeng.guns.modular.system.util.*; |
| | | import com.stylefeng.guns.modular.system.warpper.PreferentialDataVo; |
| | | import com.stylefeng.guns.modular.taxi.dao.OrderTaxiMapper; |
| | | import com.stylefeng.guns.modular.taxi.model.OrderTaxi; |
| | |
| | | ResultUtil resultUtil = ResultUtil.success(); |
| | | if(payType == 1){//微信支付 |
| | | String app = type == 1 ? "APP" : "JSAPI"; |
| | | resultUtil = payMoneyUtil.weixinpay("感谢费", "", orderId + "_6_" + UUIDUtil.getRandomCode(5), money.toString(), "/base/wxPayThankYouFee", app, userInfo.getAppletsOpenId()); |
| | | // resultUtil = payMoneyUtil.weixinpay("感谢费", "", orderId + "_6_" + UUIDUtil.getRandomCode(5), money.toString(), "/base/wxPayThankYouFee", app, userInfo.getAppletsOpenId()); |
| | | resultUtil = DouGongPayUtil.wxPayOrder(money.toString(), userInfo.getAppletsOpenId(), "感谢费", 6, String.valueOf(orderId), 4); |
| | | paymentRecordService.saveData(3, uid, 1, orderId, 6, 1, money, "", 1);//添加预支付数据 |
| | | } |
| | | if(payType == 2){//支付宝支付 |
| | | resultUtil = payMoneyUtil.alipay("感谢费", "感谢费", "", orderId + "_6_" + UUIDUtil.getRandomCode(5), money.toString(), "/base/aliPayThankYouFee"); |
| | | // resultUtil = payMoneyUtil.alipay("感谢费", "感谢费", "", orderId + "_6_" + UUIDUtil.getRandomCode(5), money.toString(), "/base/aliPayThankYouFee"); |
| | | resultUtil = DouGongPayUtil.aliPayOrder(money.toString(), userInfo.getAppletsOpenId(), "感谢费", 6, String.valueOf(orderId), 4); |
| | | paymentRecordService.saveData(1, uid, 1, orderId, 6, 2, money, "", 1);//添加预支付数据 |
| | | } |
| | | if(payType == 3){//余额支付 |
| | |
| | | package com.stylefeng.guns.modular.api; |
| | | |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.huifu.bspay.sdk.opps.core.utils.RsaUtils; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import com.stylefeng.guns.modular.account.controller.AppOrderController; |
| | | import com.stylefeng.guns.modular.account.model.TEnterpriseWithdrawal; |
| | |
| | | import java.util.Date; |
| | | import java.util.Map; |
| | | |
| | | import static org.bouncycastle.asn1.x500.style.RFC4519Style.uid; |
| | | |
| | | |
| | | /** |
| | | * 支付回调 |
| | |
| | | private PayMoneyUtil payMoneyUtil; |
| | | |
| | | |
| | | |
| | | @Autowired |
| | | private UserWithdrawalService userWithdrawalService; |
| | | private UserWithdrawalService userWithdrawalService; |
| | | @Autowired |
| | | private AppOrderController appOrderController; |
| | | |
| | | |
| | | /** |
| | | * 斗拱充值回调函数 |
| | | } |
| | | * @param request |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/DGCancelUserBalance") |
| | | public void DGCancelUserBalance(HttpServletRequest request, HttpServletResponse response) { |
| | | try { |
| | | System.out.println("DG额充值回调函数"); |
| | | String sign = request.getParameter("sign"); |
| | | String resp_data = request.getParameter("resp_data"); |
| | | System.out.println(sign); |
| | | System.out.println(resp_data); |
| | | resp_data = resp_data.replaceAll("& #40;", "(").replaceAll("& #41;", ")"); |
| | | |
| | | |
| | | boolean verify = RsaUtils.verify(resp_data, "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsWrruP9JBxrUd8uEX5Z8y7pg/UIr5RNHSgDnHqNI1hbi2MfTzB5vZ275wSFFaLDD9BesgDWqsUepPS/opROlDCg9y6WYH8mkN23NmHL9F8kT48OMmH722am+Hp0XVMMwXqA0oNt4f7oW6kDemjZW8/RT4vIE7cyxoxSsVRvjqSpx9wDgFLPWh3o0pHQaoxLyeUsGBATHFrxEDlosBvsuXjMcgjPKXALrcemzKOhBmBkLgyxNVmh61ZK+FNXd+/X4PeZlnWf54NRQAUKe1308E6IIaszo+CjneKuhj1m/X4f7AIvxAqlhuCV5E/DfKRmGopxaWqdtE960Y/H4SmBh2wIDAQAB", sign); |
| | | |
| | | if (verify) { |
| | | JSONObject jsonObject = JSONObject.parseObject(resp_data); |
| | | String order_id = jsonObject.get("out_trans_id").toString(); |
| | | String out_trade_no = jsonObject.get("req_seq_id").toString(); |
| | | String trans_stat = jsonObject.get("trans_stat").toString(); |
| | | if ("S".equals(trans_stat)) { |
| | | String[] split = out_trade_no.split("_"); |
| | | Integer uid = Integer.valueOf(split[0]); |
| | | Integer id = Integer.valueOf(split[1]); |
| | | String payAmt = jsonObject.get("pay_amt").toString(); |
| | | userInfoService.payCancelUserBalance(Integer.valueOf(uid), order_id, Integer.valueOf(id), 1); |
| | | appOrderController.createAllocationReqUser(1, Integer.valueOf(uid), 1, new BigDecimal(payAmt).divide(new BigDecimal(100)).doubleValue()); |
| | | // cloudPay(Integer.valueOf(uid),map.get("total_fee"),map.get("transaction_id"),1); |
| | | PrintWriter out = response.getWriter(); |
| | | out.write(200); |
| | | out.flush(); |
| | | out.close(); |
| | | } |
| | | |
| | | |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 微信余额充值回调函数 |
| | |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/wxCancelUserBalance") |
| | | public void wxCancelUserBalance(HttpServletRequest request, HttpServletResponse response){ |
| | | public void wxCancelUserBalance(HttpServletRequest request, HttpServletResponse response) { |
| | | try { |
| | | System.out.println("微信余额充值回调函数"); |
| | | Map<String, String> map = payMoneyUtil.weixinpayCallback(request); |
| | |
| | | String uid = map.get("attach"); |
| | | String result = map.get("result"); |
| | | userInfoService.payCancelUserBalance(Integer.valueOf(uid), order_id, Integer.valueOf(id), 1); |
| | | appOrderController.createAllocationReqUser(1,Integer.valueOf(uid),1,new BigDecimal(map.get("total_fee")).divide(new BigDecimal(100)).doubleValue()); |
| | | // cloudPay(Integer.valueOf(uid),map.get("total_fee"),map.get("transaction_id"),1); |
| | | appOrderController.createAllocationReqUser(1, Integer.valueOf(uid), 1, new BigDecimal(map.get("total_fee")).divide(new BigDecimal(100)).doubleValue()); |
| | | // cloudPay(Integer.valueOf(uid),map.get("total_fee"),map.get("transaction_id"),1); |
| | | PrintWriter out = response.getWriter(); |
| | | out.write(result); |
| | | out.flush(); |
| | | out.close(); |
| | | }catch (Exception e){ |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/aliCancelUserBalance") |
| | | public void aliCancelUserBalance(HttpServletRequest request, HttpServletResponse response){ |
| | | public void aliCancelUserBalance(HttpServletRequest request, HttpServletResponse response) { |
| | | try { |
| | | System.out.println("支付宝余额充值回调"); |
| | | Map<String, String> map = payMoneyUtil.alipayCallback(request); |
| | |
| | | String order_id = map.get("trade_no"); |
| | | String uid = map.get("passback_params"); |
| | | userInfoService.payCancelUserBalance(Integer.valueOf(uid), order_id, Integer.valueOf(id), 2); |
| | | appOrderController.createAllocationReqUser(1,Integer.valueOf(uid),1,new BigDecimal(map.get("total_amount")).doubleValue()); |
| | | appOrderController.createAllocationReqUser(1, Integer.valueOf(uid), 1, new BigDecimal(map.get("total_amount")).doubleValue()); |
| | | // cloudPay(Integer.valueOf(uid),map.get("total_amount"),map.get("trade_no"),0); |
| | | PrintWriter out = response.getWriter(); |
| | | out.print("success"); |
| | | out.flush(); |
| | | out.close(); |
| | | }catch (Exception e){ |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | public void cloudPay(Integer uid,String total_fee,String transaction_id,int type) { |
| | | if(type==1){ |
| | | public void cloudPay(Integer uid, String total_fee, String transaction_id, int type) { |
| | | if (type == 1) { |
| | | BigDecimal divide = new BigDecimal(total_fee).divide(new BigDecimal(100)); |
| | | total_fee=divide.toString(); |
| | | total_fee = divide.toString(); |
| | | } |
| | | System.out.println("回调参数:"+total_fee+"---"+transaction_id); |
| | | System.out.println("回调参数:" + total_fee + "---" + transaction_id); |
| | | UserInfo userInfo = userInfoService.selectById(uid); |
| | | UserWithdrawal driverWith = userWithdrawalService.selectOne(new EntityWrapper<UserWithdrawal>() |
| | | .eq("phone", userInfo.getPhone()) |
| | |
| | | import com.stylefeng.guns.modular.system.service.ISysIntegralService; |
| | | import com.stylefeng.guns.modular.system.service.ISystemNoticeService; |
| | | import com.stylefeng.guns.modular.system.service.IUserInfoService; |
| | | import com.stylefeng.guns.modular.system.util.DouGongPayUtil; |
| | | import com.stylefeng.guns.modular.system.util.PayMoneyUtil; |
| | | import com.stylefeng.guns.modular.system.util.ResultUtil; |
| | | import com.stylefeng.guns.modular.system.util.UUIDUtil; |
| | |
| | | ResultUtil resultUtil = ResultUtil.success(); |
| | | if(payType == 1){//微信支付 |
| | | String app = type == 1 ? "APP" : "JSAPI"; |
| | | resultUtil = payMoneyUtil.weixinpay("感谢费", "", orderId + "_7_" + UUIDUtil.getRandomCode(5), money.toString(), "/base/wxPayThankYouFee", app, userInfo.getAppletsOpenId()); |
| | | // resultUtil = payMoneyUtil.weixinpay("感谢费", "", orderId + "_7_" + UUIDUtil.getRandomCode(5), money.toString(), "/base/wxPayThankYouFee", app, userInfo.getAppletsOpenId()); |
| | | resultUtil = DouGongPayUtil.wxPayOrder(money.toString(), userInfo.getAppletsOpenId(), "感谢费", 7, String.valueOf(orderId), 4); |
| | | |
| | | paymentRecordService.saveData(3, uid, 1, orderId, 7, 1, money, "", 1);//添加预支付数据 |
| | | } |
| | | if(payType == 2){//支付宝支付 |
| | | resultUtil = payMoneyUtil.alipay("感谢费", "感谢费", "", orderId + "_7_" + UUIDUtil.getRandomCode(5), money.toString(), "/base/aliPayThankYouFee"); |
| | | // resultUtil = payMoneyUtil.alipay("感谢费", "感谢费", "", orderId + "_7_" + UUIDUtil.getRandomCode(5), money.toString(), "/base/aliPayThankYouFee"); |
| | | resultUtil = DouGongPayUtil.aliPayOrder(money.toString(), userInfo.getAppletsOpenId(), "感谢费", 7, String.valueOf(orderId), 4); |
| | | |
| | | paymentRecordService.saveData(1, uid, 1, orderId, 7, 2, money, "", 1);//添加预支付数据 |
| | | } |
| | | if(payType == 3){//余额支付 |
| | |
| | | |
| | | if(payType == 1){//微信支付 |
| | | String app = type == 1 ? "APP" : "JSAPI"; |
| | | resultUtil = payMoneyUtil.weixinpay("完成订单", "", orderId + "_3_" + UUIDUtil.getRandomCode(5), orderMoney.toString(), "/base/wxPayOrderTaxi", app, userInfo.getAppletsOpenId()); |
| | | // resultUtil = payMoneyUtil.weixinpay("完成订单", "", orderId + "_3_" + UUIDUtil.getRandomCode(5), orderMoney.toString(), "/base/wxPayOrderTaxi", app, userInfo.getAppletsOpenId()); |
| | | resultUtil = DouGongPayUtil.wxPayOrder(orderMoney.toString(), userInfo.getAppletsOpenId(), "完成订单", 3, String.valueOf(orderId), 1); |
| | | |
| | | paymentRecordService.saveData(1, orderCrossCity.getUserId(), 1, orderId, 3, 1, orderMoney, "", 1);//添加预支付数据 |
| | | } |
| | | if(payType == 2){//支付宝支付 |
| | | resultUtil = payMoneyUtil.alipay("完成订单", "完成订单", "", orderId + "_3_" + UUIDUtil.getRandomCode(5), orderMoney.toString(), "/base/aliPayOrderTaxi"); |
| | | // resultUtil = payMoneyUtil.alipay("完成订单", "完成订单", "", orderId + "_3_" + UUIDUtil.getRandomCode(5), orderMoney.toString(), "/base/aliPayOrderTaxi"); |
| | | resultUtil = DouGongPayUtil.aliPayOrder(orderMoney.toString(), userInfo.getAppletsOpenId(), "完成订单", 3, String.valueOf(orderId), 1); |
| | | paymentRecordService.saveData(1, orderCrossCity.getUserId(), 1, orderId, 3, 2, orderMoney, "", 1);//添加预支付数据 |
| | | } |
| | | if(payType == 3){//余额支付 |
| | |
| | | return ResultUtil.error("请使用余额支付"); |
| | | } |
| | | String app = type == 1 ? "APP" : "JSAPI"; |
| | | resultUtil = payMoneyUtil.weixinpay("完成订单", "", orderId + "_3_" + UUIDUtil.getRandomCode(5), orderMoney.toString(), "/base/wxPayOrderTaxi", app, userInfo.getAppletsOpenId()); |
| | | // resultUtil = payMoneyUtil.weixinpay("完成订单", "", orderId + "_3_" + UUIDUtil.getRandomCode(5), orderMoney.toString(), "/base/wxPayOrderTaxi", app, userInfo.getAppletsOpenId()); |
| | | resultUtil = DouGongPayUtil.wxPayOrder(orderMoney.toString(), userInfo.getAppletsOpenId(), "完成订单", 3, String.valueOf(orderId), 1); |
| | | paymentRecordService.saveData(1, orderCrossCity.getUserId(), 1, orderId, 3, 1, orderMoney, "", 1);//添加预支付数据 |
| | | } |
| | | if(payType == 2){//支付宝支付 |
| | | if(orderMoney == 0){ |
| | | return ResultUtil.error("请使用余额支付"); |
| | | } |
| | | resultUtil = payMoneyUtil.alipay("完成订单", "完成订单", "", orderId + "_3_" + UUIDUtil.getRandomCode(5), orderMoney.toString(), "/base/aliPayOrderTaxi"); |
| | | // resultUtil = payMoneyUtil.alipay("完成订单", "完成订单", "", orderId + "_3_" + UUIDUtil.getRandomCode(5), orderMoney.toString(), "/base/aliPayOrderTaxi"); |
| | | resultUtil = DouGongPayUtil.aliPayOrder(orderMoney.toString(), userInfo.getAppletsOpenId(), "完成订单", 3, String.valueOf(orderId), 1); |
| | | paymentRecordService.saveData(1, orderCrossCity.getUserId(), 1, orderId, 3, 2, orderMoney, "", 1);//添加预支付数据 |
| | | } |
| | | if(payType == 3){//余额支付 |
| | |
| | | orderCancelService.updateById(orderCancel); |
| | | |
| | | String app = type == 1 ? "APP" : "JSAPI"; |
| | | resultUtil = payMoneyUtil.weixinpay("订单取消", "", id + "_3_" + UUIDUtil.getRandomCode(5), query.getMoney().toString(), "/base/wxCancelOrderTaxi", app, userInfo.getAppletsOpenId()); |
| | | // resultUtil = payMoneyUtil.weixinpay("订单取消", "", id + "_3_" + UUIDUtil.getRandomCode(5), query.getMoney().toString(), "/base/wxCancelOrderTaxi", app, userInfo.getAppletsOpenId()); |
| | | resultUtil = DouGongPayUtil.wxPayOrder(query.getMoney().toString(), userInfo.getAppletsOpenId(), "订单取消", 3, String.valueOf(id), 5); |
| | | paymentRecordService.saveData(1, orderCrossCity.getUserId(), 1, id, 3, 1, query.getMoney(), "", 1);//添加预支付数据 |
| | | |
| | | // Map<String, String> map = icbcPayUtil.placeAnOrder(id + ",3", 9, 5, uid.toString(), "订单取消", query.getMoney(), callbackPath + "/base/wxCancelOrderTaxi", "", type, appletsOpenId); |
| | |
| | | orderCancel.setPayType(2); |
| | | orderCancelService.updateById(orderCancel); |
| | | |
| | | resultUtil = payMoneyUtil.alipay("订单取消", "订单取消", "", id + "_3_" + UUIDUtil.getRandomCode(5), query.getMoney().toString(), "/base/aliCancelOrderTaxi"); |
| | | // resultUtil = payMoneyUtil.alipay("订单取消", "订单取消", "", id + "_3_" + UUIDUtil.getRandomCode(5), query.getMoney().toString(), "/base/aliCancelOrderTaxi"); |
| | | resultUtil = DouGongPayUtil.aliPayOrder(query.getMoney().toString(), userInfo.getAppletsOpenId(), "订单取消", 3, String.valueOf(id), 5); |
| | | paymentRecordService.saveData(1, orderCrossCity.getUserId(), 1, id, 3, 2, query.getMoney(), "", 1);//添加预支付数据 |
| | | |
| | | // Map<String, String> map = icbcPayUtil.placeAnOrder(id + ",3", 10, 5, uid.toString(), "订单取消", query.getMoney(), callbackPath + "/base/aliCancelOrderTaxi", "", type, null); |
| | |
| | | ResultUtil resultUtil = ResultUtil.success(); |
| | | if(payType == 1){//微信支付 |
| | | String app = type == 1 ? "APP" : "JSAPI"; |
| | | resultUtil = payMoneyUtil.weixinpay("感谢费", "", orderId + "_3_" + UUIDUtil.getRandomCode(5), money.toString(), "/base/wxPayThankYouFee", app, userInfo.getAppletsOpenId()); |
| | | // resultUtil = payMoneyUtil.weixinpay("感谢费", "", orderId + "_3_" + UUIDUtil.getRandomCode(5), money.toString(), "/base/wxPayThankYouFee", app, userInfo.getAppletsOpenId()); |
| | | resultUtil = DouGongPayUtil.wxPayOrder(money.toString(), userInfo.getAppletsOpenId(), "感谢费", 3, String.valueOf(orderId), 4); |
| | | paymentRecordService.saveData(3, uid, 1, orderId, 3, 1, money, "", 1);//添加预支付数据 |
| | | } |
| | | if(payType == 2){//支付宝支付 |
| | | resultUtil = payMoneyUtil.alipay("感谢费", "感谢费", "", orderId + "_3_" + UUIDUtil.getRandomCode(5), money.toString(), "/base/aliPayThankYouFee"); |
| | | // resultUtil = payMoneyUtil.alipay("感谢费", "感谢费", "", orderId + "_3_" + UUIDUtil.getRandomCode(5), money.toString(), "/base/aliPayThankYouFee"); |
| | | resultUtil = DouGongPayUtil.aliPayOrder(money.toString(), userInfo.getAppletsOpenId(), "感谢费", 3, String.valueOf(orderId), 4); |
| | | paymentRecordService.saveData(1, uid, 1, orderId, 3, 2, money, "", 1);//添加预支付数据 |
| | | } |
| | | if(payType == 3){//余额支付 |
| | |
| | | |
| | | if(payType == 1){//微信支付 |
| | | String app = type == 1 ? "APP" : "JSAPI"; |
| | | resultUtil = payMoneyUtil.weixinpay("小件物流下单支付", "", orderId + "_" + orderLogistics.getType() + "_" + UUIDUtil.getRandomCode(5), orderMoney.toString(), "/base/wxPayOrderTaxi", app, userInfo.getAppletsOpenId()); |
| | | // resultUtil = payMoneyUtil.weixinpay("小件物流下单支付", "", orderId + "_" + orderLogistics.getType() + "_" + UUIDUtil.getRandomCode(5), orderMoney.toString(), "/base/wxPayOrderTaxi", app, userInfo.getAppletsOpenId()); |
| | | resultUtil = DouGongPayUtil.wxPayOrder(orderMoney.toString(), userInfo.getAppletsOpenId(), "完成订单", orderLogistics.getType(), String.valueOf(orderId), 1); |
| | | |
| | | paymentRecordService.saveData(1, orderLogistics.getUserId(), 1, orderId, orderLogistics.getType(), 1, orderMoney, "", 1);//添加预支付数据 |
| | | } |
| | | if(payType == 2){//支付宝支付 |
| | | resultUtil = payMoneyUtil.alipay("小件物流下单支付", "小件物流下单支付", "", orderId + "_" + orderLogistics.getType() + "_" + UUIDUtil.getRandomCode(5), orderMoney.toString(), "/base/aliPayOrderTaxi"); |
| | | // resultUtil = payMoneyUtil.alipay("小件物流下单支付", "小件物流下单支付", "", orderId + "_" + orderLogistics.getType() + "_" + UUIDUtil.getRandomCode(5), orderMoney.toString(), "/base/aliPayOrderTaxi"); |
| | | resultUtil = DouGongPayUtil.aliPayOrder(orderMoney.toString(), userInfo.getAppletsOpenId(), "完成订单", orderLogistics.getType(), String.valueOf(orderId), 1); |
| | | |
| | | paymentRecordService.saveData(1, orderLogistics.getUserId(), 1, orderId, orderLogistics.getType(), 2, orderMoney, "", 1);//添加预支付数据 |
| | | } |
| | | if(payType == 3){//余额支付 |
| | |
| | | return ResultUtil.error("请使用余额支付"); |
| | | } |
| | | String app = type == 1 ? "APP" : "JSAPI"; |
| | | resultUtil = payMoneyUtil.weixinpay("小件物流下单支付", "", orderId + "_" + orderLogistics.getType() + "_" + UUIDUtil.getRandomCode(5), orderMoney.toString(), "/base/wxPayOrderTaxi", app, userInfo.getAppletsOpenId()); |
| | | // resultUtil = payMoneyUtil.weixinpay("小件物流下单支付", "", orderId + "_" + orderLogistics.getType() + "_" + UUIDUtil.getRandomCode(5), orderMoney.toString(), "/base/wxPayOrderTaxi", app, userInfo.getAppletsOpenId()); |
| | | resultUtil = DouGongPayUtil.wxPayOrder(orderMoney.toString(), userInfo.getAppletsOpenId(), "小件物流下单支付", orderLogistics.getType(), String.valueOf(orderId), 1); |
| | | paymentRecordService.saveData(1, orderLogistics.getUserId(), 1, orderId, orderLogistics.getType(), 1, orderMoney, "", 1);//添加预支付数据 |
| | | } |
| | | if(payType == 2){//支付宝支付 |
| | | if(orderMoney == 0){ |
| | | return ResultUtil.error("请使用余额支付"); |
| | | } |
| | | resultUtil = payMoneyUtil.alipay("小件物流下单支付", "小件物流下单支付", "", orderId + "_" + orderLogistics.getType() + "_" + UUIDUtil.getRandomCode(5), orderMoney.toString(), "/base/aliPayOrderTaxi"); |
| | | // resultUtil = payMoneyUtil.alipay("小件物流下单支付", "小件物流下单支付", "", orderId + "_" + orderLogistics.getType() + "_" + UUIDUtil.getRandomCode(5), orderMoney.toString(), "/base/aliPayOrderTaxi"); |
| | | resultUtil = DouGongPayUtil.aliPayOrder(orderMoney.toString(), userInfo.getAppletsOpenId(), "小件物流下单支付", orderLogistics.getType(), String.valueOf(orderId), 1); |
| | | |
| | | paymentRecordService.saveData(1, orderLogistics.getUserId(), 1, orderId, orderLogistics.getType(), 2, orderMoney, "", 1);//添加预支付数据 |
| | | } |
| | | if(payType == 3){//余额支付 |
| | |
| | | |
| | | if(payType == 1){//微信支付 |
| | | String app = type == 1 ? "APP" : "JSAPI"; |
| | | resultUtil = payMoneyUtil.weixinpay("小件物流补差价", "", orderId + "_" + orderLogistics.getType() + "_" + UUIDUtil.getRandomCode(5), orderMoney.toString(), "/base/wxPayOrderLogisticsSpread", app, userInfo.getAppletsOpenId()); |
| | | // resultUtil = payMoneyUtil.weixinpay("小件物流补差价", "", orderId + "_" + orderLogistics.getType() + "_" + UUIDUtil.getRandomCode(5), orderMoney.toString(), "/base/wxPayOrderLogisticsSpread", app, userInfo.getAppletsOpenId()); |
| | | resultUtil = DouGongPayUtil.wxPayOrder(orderMoney.toString(), userInfo.getAppletsOpenId(), "小件物流补差价", orderLogistics.getType(), String.valueOf(orderId), 2); |
| | | paymentRecordService.saveData(1, orderLogistics.getUserId(), 1, orderId, orderLogistics.getType(), 1, orderMoney, "", 1);//添加预支付数据 |
| | | } |
| | | if(payType == 2){//支付宝支付 |
| | | resultUtil = payMoneyUtil.alipay("小件物流补差价", "小件物流补差价", "", orderId + "_" + orderLogistics.getType() + "_" + UUIDUtil.getRandomCode(5), orderMoney.toString(), "/base/aliPayOrderLogisticsSpread"); |
| | | // resultUtil = payMoneyUtil.alipay("小件物流补差价", "小件物流补差价", "", orderId + "_" + orderLogistics.getType() + "_" + UUIDUtil.getRandomCode(5), orderMoney.toString(), "/base/aliPayOrderLogisticsSpread"); |
| | | resultUtil = DouGongPayUtil.aliPayOrder(orderMoney.toString(), userInfo.getAppletsOpenId(), "小件物流补差价", orderLogistics.getType(), String.valueOf(orderId), 2); |
| | | paymentRecordService.saveData(1, orderLogistics.getUserId(), 1, orderId, orderLogistics.getType(), 2, orderMoney, "", 1);//添加预支付数据 |
| | | } |
| | | if(payType == 3){//余额支付 |
| | |
| | | ResultUtil resultUtil = ResultUtil.success(); |
| | | if(payType == 1){//微信支付 |
| | | String app = type == 1 ? "APP" : "JSAPI"; |
| | | resultUtil = payMoneyUtil.weixinpay("感谢费", "", orderId + "_" + orderLogistics.getType() + "_" + UUIDUtil.getRandomCode(5), money.toString(), "/base/wxPayThankYouFee", app, userInfo.getAppletsOpenId()); |
| | | // resultUtil = payMoneyUtil.weixinpay("感谢费", "", orderId + "_" + orderLogistics.getType() + "_" + UUIDUtil.getRandomCode(5), money.toString(), "/base/wxPayThankYouFee", app, userInfo.getAppletsOpenId()); |
| | | resultUtil = DouGongPayUtil.wxPayOrder(money.toString(), userInfo.getAppletsOpenId(), "感谢费", orderLogistics.getType(), String.valueOf(orderId), 4); |
| | | paymentRecordService.saveData(3, uid, 1, orderId, orderLogistics.getType(), 1, money, "", 1);//添加预支付数据 |
| | | } |
| | | if(payType == 2){//支付宝支付 |
| | | resultUtil = payMoneyUtil.alipay("感谢费", "感谢费", "", orderId + "_" + orderLogistics.getType() + "_" + UUIDUtil.getRandomCode(5), money.toString(), "/base/aliPayThankYouFee"); |
| | | // resultUtil = payMoneyUtil.alipay("感谢费", "感谢费", "", orderId + "_" + orderLogistics.getType() + "_" + UUIDUtil.getRandomCode(5), money.toString(), "/base/aliPayThankYouFee"); |
| | | resultUtil = DouGongPayUtil.wxPayOrder(money.toString(), userInfo.getAppletsOpenId(), "感谢费", orderLogistics.getType(), String.valueOf(orderId), 4); |
| | | paymentRecordService.saveData(1, uid, 1, orderId, orderLogistics.getType(), 2, money, "", 1);//添加预支付数据 |
| | | } |
| | | if(payType == 3){//余额支付 |
| | |
| | | orderCancel.setPayType(1); |
| | | orderCancelService.updateById(orderCancel); |
| | | String app = type == 1 ? "APP" : "JSAPI"; |
| | | resultUtil = payMoneyUtil.weixinpay("订单取消", "", id + "_1_" + UUIDUtil.getRandomCode(5), query.getMoney().toString(), "/base/wxCancelOrderTaxi", app, userInfo.getAppletsOpenId()); |
| | | // resultUtil = payMoneyUtil.weixinpay("订单取消", "", id + "_1_" + UUIDUtil.getRandomCode(5), query.getMoney().toString(), "/base/wxCancelOrderTaxi", app, userInfo.getAppletsOpenId()); |
| | | resultUtil = DouGongPayUtil.wxPayOrder(query.getMoney().toString(), userInfo.getAppletsOpenId(), "订单取消", 1, String.valueOf(id), 5); |
| | | paymentRecordService.saveData(1, orderPrivateCar.getUserId(), 1, id, 1, 1, query.getMoney(), "", 1);//添加预支付数据 |
| | | } |
| | | if(payType == 2){//支付宝支付 |
| | | orderCancel.setPayType(2); |
| | | orderCancelService.updateById(orderCancel); |
| | | |
| | | resultUtil = payMoneyUtil.alipay("订单取消", "订单取消", "", id + "_1_" + UUIDUtil.getRandomCode(5), query.getMoney().toString(), "/base/aliCancelOrderTaxi"); |
| | | // resultUtil = payMoneyUtil.alipay("订单取消", "订单取消", "", id + "_1_" + UUIDUtil.getRandomCode(5), query.getMoney().toString(), "/base/aliCancelOrderTaxi"); |
| | | resultUtil = DouGongPayUtil.aliPayOrder(query.getMoney().toString(), userInfo.getAppletsOpenId(), "订单取消", 3, String.valueOf(id), 5); |
| | | paymentRecordService.saveData(1, orderPrivateCar.getUserId(), 1, id, 1, 2, query.getMoney(), "", 1);//添加预支付数据 |
| | | } |
| | | if(payType == 3){//余额支付 |
| | |
| | | orderMoney = orderMoney < 0 ? 0 : orderMoney; |
| | | if(payType == 1){//微信支付 |
| | | String app = type == 1 ? "APP" : "JSAPI"; |
| | | resultUtil = payMoneyUtil.weixinpay("完成订单", "", orderId + "_1_" + UUIDUtil.getRandomCode(5), orderMoney.toString(), "/base/wxPayOrderTaxi", app, userInfo.getAppletsOpenId()); |
| | | // resultUtil = payMoneyUtil.weixinpay("完成订单", "", orderId + "_1_" + UUIDUtil.getRandomCode(5), orderMoney.toString(), "/base/wxPayOrderTaxi", app, userInfo.getAppletsOpenId()); |
| | | resultUtil = DouGongPayUtil.wxPayOrder(orderMoney.toString(), userInfo.getAppletsOpenId(), "完成订单", 1, String.valueOf(orderId), 1); |
| | | |
| | | paymentRecordService.saveData(1, orderPrivateCar.getUserId(), 1, orderId, 1, 1, orderMoney, "", 1);//添加预支付数据 |
| | | } |
| | | if(payType == 2) {//支付宝支付 |
| | | resultUtil = payMoneyUtil.alipay("完成订单", "完成订单", "", orderId + "_1_" + UUIDUtil.getRandomCode(5), orderMoney.toString(), "/base/aliPayOrderTaxi"); |
| | | // resultUtil = payMoneyUtil.alipay("完成订单", "完成订单", "", orderId + "_1_" + UUIDUtil.getRandomCode(5), orderMoney.toString(), "/base/aliPayOrderTaxi"); |
| | | resultUtil = DouGongPayUtil.aliPayOrder(orderMoney.toString(), userInfo.getAppletsOpenId(), "完成订单", 1, String.valueOf(orderId), 1); |
| | | |
| | | paymentRecordService.saveData(1, orderPrivateCar.getUserId(), 1, orderId, 1, 2, orderMoney, "", 1);//添加预支付数据 |
| | | } |
| | | if(payType == 3){//余额支付 |
| | |
| | | return ResultUtil.error("请使用余额支付"); |
| | | } |
| | | String app = type == 1 ? "APP" : "JSAPI"; |
| | | resultUtil = payMoneyUtil.weixinpay("完成订单", "", orderId + "_1_" + UUIDUtil.getRandomCode(5), orderMoney.toString(), "/base/wxPayOrderTaxi", app, userInfo.getAppletsOpenId()); |
| | | // resultUtil = payMoneyUtil.weixinpay("完成订单", "", orderId + "_1_" + UUIDUtil.getRandomCode(5), orderMoney.toString(), "/base/wxPayOrderTaxi", app, userInfo.getAppletsOpenId()); |
| | | // DG支付 |
| | | resultUtil = DouGongPayUtil.wxPayOrder(orderMoney.toString(), userInfo.getAppletsOpenId(), "完成订单", 1, String.valueOf(orderId), 1); |
| | | paymentRecordService.saveData(1, orderPrivateCar.getUserId(), 1, orderId, 1, 1, orderMoney, "", 1);//添加预支付数据 |
| | | } |
| | | if(payType == 2) {//支付宝支付 |
| | | if(orderMoney == 0){ |
| | | return ResultUtil.error("请使用余额支付"); |
| | | } |
| | | resultUtil = payMoneyUtil.alipay("完成订单", "完成订单", "", orderId + "_1_" + UUIDUtil.getRandomCode(5), orderMoney.toString(), "/base/aliPayOrderTaxi"); |
| | | // resultUtil = payMoneyUtil.alipay("完成订单", "完成订单", "", orderId + "_1_" + UUIDUtil.getRandomCode(5), orderMoney.toString(), "/base/aliPayOrderTaxi"); |
| | | resultUtil = DouGongPayUtil.aliPayOrder(orderMoney.toString(), userInfo.getAppletsOpenId(), "完成订单", 1, String.valueOf(orderId), 1); |
| | | |
| | | paymentRecordService.saveData(1, orderPrivateCar.getUserId(), 1, orderId, 1, 2, orderMoney, "", 1);//添加预支付数据 |
| | | } |
| | | if(payType == 3){//余额支付 |
| | |
| | | ResultUtil resultUtil = ResultUtil.success(); |
| | | if(payType == 1){//微信支付 |
| | | String app = type == 1 ? "APP" : "JSAPI"; |
| | | resultUtil = payMoneyUtil.weixinpay("感谢费", "", orderId + "_1_" + UUIDUtil.getRandomCode(5), money.toString(), "/base/wxPayThankYouFee", app, userInfo.getAppletsOpenId()); |
| | | // resultUtil = payMoneyUtil.weixinpay("感谢费", "", orderId + "_1_" + UUIDUtil.getRandomCode(5), money.toString(), "/base/wxPayThankYouFee", app, userInfo.getAppletsOpenId()); |
| | | resultUtil = DouGongPayUtil.wxPayOrder(money.toString(), userInfo.getAppletsOpenId(), "感谢费", 1, String.valueOf(orderId), 4); |
| | | paymentRecordService.saveData(3, uid, 1, orderId, 1, 1, money, "", 1);//添加预支付数据 |
| | | } |
| | | if(payType == 2){//支付宝支付 |
| | | resultUtil = payMoneyUtil.alipay("感谢费", "感谢费", "", orderId + "_1_" + UUIDUtil.getRandomCode(5), money.toString(), "/base/aliPayThankYouFee"); |
| | | // resultUtil = payMoneyUtil.alipay("感谢费", "感谢费", "", orderId + "_1_" + UUIDUtil.getRandomCode(5), money.toString(), "/base/aliPayThankYouFee"); |
| | | resultUtil = DouGongPayUtil.aliPayOrder(money.toString(), userInfo.getAppletsOpenId(), "感谢费", 1, String.valueOf(orderId), 4); |
| | | paymentRecordService.saveData(3, uid, 1, orderId, 1, 2, money, "", 1);//添加预支付数据 |
| | | } |
| | | if(payType == 3){//余额支付 |
| | |
| | | import com.stylefeng.guns.modular.system.dao.TaxiCardMapper; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | | import com.stylefeng.guns.modular.system.util.DouGongPayUtil; |
| | | import com.stylefeng.guns.modular.system.util.GDMapGeocodingUtil; |
| | | import com.stylefeng.guns.modular.system.util.PayMoneyUtil; |
| | | import com.stylefeng.guns.modular.system.util.ResultUtil; |
| | |
| | | ResultUtil resultUtil = ResultUtil.success(); |
| | | if(payType == 1){//微信支付 |
| | | String app = type == 1 ? "APP" : "JSAPI"; |
| | | resultUtil = payMoneyUtil.weixinpay("购买出行卡", "", ToolUtil.getRandomString(10), taxiCard.getSellingPrice().toString(), "/base/wxPayTaxiCardPaymentSpread", app, userInfo.getAppletsOpenId()); |
| | | // resultUtil = payMoneyUtil.weixinpay("购买出行卡", "", ToolUtil.getRandomString(10), taxiCard.getSellingPrice().toString(), "/base/wxPayTaxiCardPaymentSpread", app, userInfo.getAppletsOpenId()); |
| | | resultUtil = DouGongPayUtil.wxPayOrder(taxiCard.getSellingPrice().toString(), userInfo.getAppletsOpenId(), "购买出行卡", 1, String.valueOf(id), 3); |
| | | paymentRecordService.saveData(4, taxiCardPayment.getUserId(), 1, taxiCardPayment.getId(), null, 1, taxiCard.getSellingPrice(), "", 1);//添加预支付数据 |
| | | } |
| | | if(payType == 2){//支付宝支付 |
| | | resultUtil = payMoneyUtil.alipay("购买出行卡", "购买出行卡", "", ToolUtil.getRandomString(10), taxiCard.getSellingPrice().toString(), "/base/aliPayTaxiCardPaymentSpread"); |
| | | // resultUtil = payMoneyUtil.alipay("购买出行卡", "购买出行卡", "", ToolUtil.getRandomString(10), taxiCard.getSellingPrice().toString(), "/base/aliPayTaxiCardPaymentSpread"); |
| | | resultUtil = DouGongPayUtil.aliPayOrder(taxiCard.getSellingPrice().toString(), userInfo.getAppletsOpenId(), "购买出行卡", 1, String.valueOf(id), 3); |
| | | paymentRecordService.saveData(4, taxiCardPayment.getUserId(), 1, taxiCardPayment.getId(), null, 2, taxiCard.getSellingPrice(), "", 1);//添加预支付数据 |
| | | } |
| | | if(payType == 3){//余额支付 |
| | |
| | | } |
| | | Integer integer = paymentRecordService.saveData(2, uid, 1, null, null, 1, money, "", 1);//添加预支付数据 |
| | | String app = type == 1 ? "APP" : "JSAPI"; |
| | | return payMoneyUtil.weixinpay("余额充值", uid.toString(), integer.toString(), money.toString(), "/base/wxCancelUserBalance", app, userInfo.getAppletsOpenId()); |
| | | // return payMoneyUtil.weixinpay("余额充值", uid.toString(), integer.toString(), money.toString(), "/base/wxCancelUserBalance", app, userInfo.getAppletsOpenId()); |
| | | |
| | | return DouGongPayUtil.wxPayOrder(money.toString(), appletsOpenId, "余额充值", uid, String.valueOf(integer), 6); |
| | | |
| | | // Map<String, String> map = icbcPayUtil.placeAnOrder(integer.toString(), 9, 5, uid.toString(), "余额充值", money, callbackPath + "/base/wxCancelUserBalance", uid.toString(), type, appletsOpenId); |
| | | // if(map.get("code").equals("200")){ |
| | |
| | | } |
| | | if(payType == 2){//支付宝支付 |
| | | Integer integer = paymentRecordService.saveData(2, uid, 1, null, null, 2, money, "", 1);//添加预支付数据 |
| | | |
| | | return payMoneyUtil.alipay("余额充值", "余额充值", uid.toString(), integer.toString(), money.toString(), "/base/aliCancelUserBalance"); |
| | | |
| | | // return payMoneyUtil.alipay("余额充值", "余额充值", uid.toString(), integer.toString(), money.toString(), "/base/aliCancelUserBalance"); |
| | | return DouGongPayUtil.aliPayOrder(money.toString(), null, "余额充值", uid, String.valueOf(integer), 6); |
| | | // Map<String, String> map = icbcPayUtil.placeAnOrder(integer.toString(), 10, 5, uid.toString(), "余额充值", money, callbackPath + "/base/aliCancelUserBalance", uid.toString(), type, null); |
| | | // if(map.get("code").equals("200")){ |
| | | // PaymentRecord paymentRecord = paymentRecordService.selectById(integer); |
| | |
| | | |
| | | HttpResponse execute = post.execute(); |
| | | System.out.println(execute.body()); |
| | | String body = execute.body(); |
| | | JSONObject jsonObject = JSONObject.parseObject(body); |
| | | System.out.println(jsonObject); |
| | | } |
| | | |
| | | |
| | |
| | | * @param orderId |
| | | * @return |
| | | */ |
| | | public static String wxPayOrder(String money, String openId, String goodsDesc, int type, String orderId, int callType) { |
| | | public static ResultUtil wxPayOrder(String money, String openId, String goodsDesc, int type, String orderId, int callType) { |
| | | HttpRequest post = HttpUtil.createPost("https://api.huifu.com/v4/trade/payment/create"); |
| | | String req_seq_id = orderId + "_" + type + "_" + System.currentTimeMillis() + ToolUtil.getRandomNumber(10); |
| | | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd"); |
| | |
| | | case 4: |
| | | // 感谢费支付回调 |
| | | notifyUrl = callbackPath + "/base/DGPayThankYouFee"; |
| | | break; |
| | | case 5: |
| | | // 取消订单 |
| | | notifyUrl = callbackPath + "/base/DGCancelOrderTaxi"; |
| | | break; |
| | | case 6: |
| | | // 充值 |
| | | notifyUrl = callbackPath + "/base/wxCancelUserBalance"; |
| | | break; |
| | | } |
| | | String a = "{\n" + |
| | |
| | | |
| | | HttpResponse execute = post.execute(); |
| | | System.out.println(execute.body()); |
| | | return execute.body(); |
| | | JSONObject jsonObject = JSONObject.parseObject(execute.body()); |
| | | return ResultUtil.success(jsonObject); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @param orderId |
| | | * @return |
| | | */ |
| | | public static String aliPayOrder(String money, String buyerId, String goodsDesc, int type, String orderId, int callType) { |
| | | public static ResultUtil aliPayOrder(String money, String buyerId, String goodsDesc, int type, String orderId, int callType) { |
| | | HttpRequest post = HttpUtil.createPost("https://api.huifu.com/v4/trade/payment/create"); |
| | | String req_seq_id = orderId + "_" + type + "_" + System.currentTimeMillis() + ToolUtil.getRandomNumber(10); |
| | | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd"); |
| | |
| | | " \"goods_desc\": \"" + goodsDesc + "\",\n" + |
| | | " \"remark\": \"嘉易行\",\n" + |
| | | " \"notify_url\": \""+notifyUrl+"\",\n" + |
| | | " \"method_expand\": \"{\\\"buyer_id\\\":\\\"" + buyerId + "\\\"}\"\n" + |
| | | " }"; |
| | | // 去掉换行、空格等格式字符 |
| | | a = a.replaceAll("\\s", ""); |
| | |
| | | " \"goods_desc\": \"" + goodsDesc + "\",\n" + |
| | | " \"remark\": \"嘉易行\",\n" + |
| | | " \"notify_url\": \""+notifyUrl+"\",\n" + |
| | | " \"method_expand\": \"{\\\"buyer_id\\\":\\\"" + buyerId + "\\\"}\"\n" + |
| | | " }\n" + |
| | | "}\n"; |
| | | System.out.println(p); |
| | | post.body(p); |
| | | |
| | | HttpResponse execute = post.execute(); |
| | | System.out.println(execute.body()); |
| | | return execute.body(); |
| | | JSONObject jsonObject = JSONObject.parseObject(execute.body()); |
| | | return ResultUtil.success(jsonObject); |
| | | } |
| | | |
| | | |
| | |
| | | orderCancel.setPayType(1); |
| | | orderCancelService.updateById(orderCancel); |
| | | String app = type == 1 ? "APP" : "JSAPI"; |
| | | resultUtil = payMoneyUtil.weixinpay("订单取消", "", id + "_2_" + UUIDUtil.getRandomCode(5), query.getMoney().toString(), "/base/wxCancelOrderTaxi", app, userInfo.getAppletsOpenId()); |
| | | // resultUtil = payMoneyUtil.weixinpay("订单取消", "", id + "_2_" + UUIDUtil.getRandomCode(5), query.getMoney().toString(), "/base/wxCancelOrderTaxi", app, userInfo.getAppletsOpenId()); |
| | | resultUtil = DouGongPayUtil.wxPayOrder(query.getMoney().toString(), userInfo.getAppletsOpenId(), "订单取消", 2, String.valueOf(id), 5); |
| | | paymentRecordService.saveData(1, orderTaxi.getUserId(), 1, id, 2, 1, query.getMoney(), "", 1);//添加预支付数据 |
| | | |
| | | // Map<String, String> map = icbcPayUtil.placeAnOrder(id + ",2", 9, 5, uid.toString(), "订单取消", query.getMoney(), callbackPath + "/base/wxCancelOrderTaxi", "", type, appletsOpenId); |
| | |
| | | if(payType == 2){//支付宝支付 |
| | | orderCancel.setPayType(2); |
| | | orderCancelService.updateById(orderCancel); |
| | | resultUtil = payMoneyUtil.alipay("订单取消", "订单取消", "", id + "_2_" + UUIDUtil.getRandomCode(5), query.getMoney().toString(), "/base/aliCancelOrderTaxi"); |
| | | // resultUtil = payMoneyUtil.alipay("订单取消", "订单取消", "", id + "_2_" + UUIDUtil.getRandomCode(5), query.getMoney().toString(), "/base/aliCancelOrderTaxi"); |
| | | resultUtil = DouGongPayUtil.wxPayOrder(query.getMoney().toString(), userInfo.getAppletsOpenId(), "订单取消", 2, String.valueOf(id), 5); |
| | | paymentRecordService.saveData(1, orderTaxi.getUserId(), 1, id, 2, 2, query.getMoney(), "", 1);//添加预支付数据 |
| | | |
| | | // Map<String, String> map = icbcPayUtil.placeAnOrder(id + ",2", 10, 5, uid.toString(), "订单取消", query.getMoney(), callbackPath + "/base/aliCancelOrderTaxi", "", type, null); |
| | |
| | | |
| | | if(payType == 1){//微信支付 |
| | | String app = type == 1 ? "APP" : "JSAPI"; |
| | | resultUtil = payMoneyUtil.weixinpay("完成订单", "", orderId + "_2_" + UUIDUtil.getRandomCode(5), orderMoney.toString(), "/base/wxPayOrderTaxi", app, userInfo.getAppletsOpenId()); |
| | | // resultUtil = payMoneyUtil.weixinpay("完成订单", "", orderId + "_2_" + UUIDUtil.getRandomCode(5), orderMoney.toString(), "/base/wxPayOrderTaxi", app, userInfo.getAppletsOpenId()); |
| | | resultUtil = DouGongPayUtil.wxPayOrder(orderMoney.toString(), userInfo.getAppletsOpenId(), "完成订单", 2, String.valueOf(orderId), 1); |
| | | |
| | | paymentRecordService.saveData(1, orderTaxi.getUserId(), 1, orderId, 2, 1, orderMoney, "", 1);//添加预支付数据 |
| | | } |
| | | if(payType == 2){//支付宝支付 |
| | | resultUtil = payMoneyUtil.alipay("完成订单", "完成订单", "", orderId + "_2_" + UUIDUtil.getRandomCode(5), orderMoney.toString(), "/base/aliPayOrderTaxi"); |
| | | // resultUtil = payMoneyUtil.alipay("完成订单", "完成订单", "", orderId + "_2_" + UUIDUtil.getRandomCode(5), orderMoney.toString(), "/base/aliPayOrderTaxi"); |
| | | resultUtil = DouGongPayUtil.wxPayOrder(orderMoney.toString(), userInfo.getAppletsOpenId(), "完成订单", 2, String.valueOf(orderId), 1); |
| | | |
| | | paymentRecordService.saveData(1, orderTaxi.getUserId(), 1, orderId, 2, 2, orderMoney, "", 1);//添加预支付数据 |
| | | } |
| | | if(payType == 3){//余额支付 |
| | |
| | | return ResultUtil.error("请使用余额支付"); |
| | | } |
| | | String app = type == 1 ? "APP" : "JSAPI"; |
| | | resultUtil = payMoneyUtil.weixinpay("完成订单", "", orderId + "_2_" + UUIDUtil.getRandomCode(5), orderMoney.toString(), "/base/wxPayOrderTaxi", app, userInfo.getAppletsOpenId()); |
| | | // resultUtil = payMoneyUtil.weixinpay("完成订单", "", orderId + "_2_" + UUIDUtil.getRandomCode(5), orderMoney.toString(), "/base/wxPayOrderTaxi", app, userInfo.getAppletsOpenId()); |
| | | resultUtil = DouGongPayUtil.wxPayOrder(orderMoney.toString(), userInfo.getAppletsOpenId(), "完成订单", 2, String.valueOf(orderId), 1); |
| | | |
| | | paymentRecordService.saveData(1, orderTaxi.getUserId(), 1, orderId, 2, 1, orderMoney, "", 1);//添加预支付数据 |
| | | } |
| | | if(payType == 2){//支付宝支付 |
| | | if(orderMoney == 0){ |
| | | return ResultUtil.error("请使用余额支付"); |
| | | } |
| | | resultUtil = payMoneyUtil.alipay("完成订单", "完成订单", "", orderId + "_2_" + UUIDUtil.getRandomCode(5), orderMoney.toString(), "/base/aliPayOrderTaxi"); |
| | | // resultUtil = payMoneyUtil.alipay("完成订单", "完成订单", "", orderId + "_2_" + UUIDUtil.getRandomCode(5), orderMoney.toString(), "/base/aliPayOrderTaxi"); |
| | | resultUtil = DouGongPayUtil.aliPayOrder(orderMoney.toString(), userInfo.getAppletsOpenId(), "完成订单", 2, String.valueOf(orderId), 1); |
| | | paymentRecordService.saveData(1, orderTaxi.getUserId(), 1, orderId, 2, 2, orderMoney, "", 1);//添加预支付数据 |
| | | } |
| | | if(payType == 3){//余额支付 |
| | |
| | | ResultUtil resultUtil = ResultUtil.success(); |
| | | if(payType == 1){//微信支付 |
| | | String app = type == 1 ? "APP" : "JSAPI"; |
| | | resultUtil = payMoneyUtil.weixinpay("感谢费", "", orderId + "_2_" + UUIDUtil.getRandomCode(5), money.toString(), "/base/wxPayThankYouFee", app, userInfo.getAppletsOpenId()); |
| | | // resultUtil = payMoneyUtil.weixinpay("感谢费", "", orderId + "_2_" + UUIDUtil.getRandomCode(5), money.toString(), "/base/wxPayThankYouFee", app, userInfo.getAppletsOpenId()); |
| | | resultUtil = DouGongPayUtil.wxPayOrder(money.toString(), userInfo.getAppletsOpenId(), "感谢费", 2, String.valueOf(orderId), 4); |
| | | paymentRecordService.saveData(3, uid, 1, orderId, 2, 1, money, "", 1);//添加预支付数据 |
| | | } |
| | | if(payType == 2){//支付宝支付 |
| | | resultUtil = payMoneyUtil.alipay("感谢费", "感谢费", "", orderId + "_2_" + UUIDUtil.getRandomCode(5), money.toString(), "/base/aliPayThankYouFee"); |
| | | // resultUtil = payMoneyUtil.alipay("感谢费", "感谢费", "", orderId + "_2_" + UUIDUtil.getRandomCode(5), money.toString(), "/base/aliPayThankYouFee"); |
| | | resultUtil = DouGongPayUtil.aliPayOrder(money.toString(), userInfo.getAppletsOpenId(), "感谢费", 2, String.valueOf(orderId), 4); |
| | | paymentRecordService.saveData(1, uid, 1, orderId, 2, 2, money, "", 1);//添加预支付数据 |
| | | } |
| | | if(payType == 3){//余额支付 |