|  | @@ -31,10 +31,6 @@ public class YqPayUtil {
 | 
	
		
			
				|  |  |          this.requestMap = rqMap;
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    public Map<String, Object> getRequestMap() {
 | 
	
		
			
				|  |  | -        return this.requestMap;
 | 
	
		
			
				|  |  | -    }
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |      //验签
 | 
	
		
			
				|  |  |      public static boolean verify(Map<String, Object> rsMap) {
 | 
	
		
			
				|  |  |          String sign = (String) rsMap.get("sign");
 | 
	
	
		
			
				|  | @@ -46,46 +42,51 @@ public class YqPayUtil {
 | 
	
		
			
				|  |  |              return false;
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  | -//
 | 
	
		
			
				|  |  | -//    public Map getPayMap() throws Exception {
 | 
	
		
			
				|  |  | -////    	order.setAmount(new BigDecimal(2));
 | 
	
		
			
				|  |  | -//
 | 
	
		
			
				|  |  | -//        String notifyUrl = this.notifyUrl; //异步通知地址
 | 
	
		
			
				|  |  | -//        String returnUrl = this.returnHost + "/#/payment?userId=" + order.getUserId();//支付后返回页面
 | 
	
		
			
				|  |  | -//
 | 
	
		
			
				|  |  | -//        if (school != null) {
 | 
	
		
			
				|  |  | -//            returnUrl = this.returnHost + "/#/login?schoolId=" + school.getSchoolId() + "&cityId=" + school.getCityId();//支付后返回页面
 | 
	
		
			
				|  |  | -//        }
 | 
	
		
			
				|  |  | -//        String payUrl = "https://qyfapi.95epay.com/api/api/hPay/toPayHtml";//支付跳转页
 | 
	
		
			
				|  |  | -//        String payChannels = "{\"weChatPay\":true,\"weChatPayMobile\":false,\"aliPay\":true,\"fastpayXy\":true,\"aliPayMobile\":false,\"balancePay\":false}";//支付方式配置
 | 
	
		
			
				|  |  | -//
 | 
	
		
			
				|  |  | -//        List<Map> tempRoutingList = new ArrayList();
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    /**
 | 
	
		
			
				|  |  | +     * 返回订单提交数据
 | 
	
		
			
				|  |  | +     * @param amount 金额
 | 
	
		
			
				|  |  | +     * @param orderNo 订单编号
 | 
	
		
			
				|  |  | +     * @param notifyUrl 异步通知地址
 | 
	
		
			
				|  |  | +     * @param returnUrl 支付返回地址
 | 
	
		
			
				|  |  | +     * @param orderSubject 订单标题
 | 
	
		
			
				|  |  | +     * @param orderBody 订单内容
 | 
	
		
			
				|  |  | +     * @return
 | 
	
		
			
				|  |  | +     * @throws Exception
 | 
	
		
			
				|  |  | +     */
 | 
	
		
			
				|  |  | +    public Map getPayMap(BigDecimal amount,String orderNo,String notifyUrl,String returnUrl,String orderSubject,String orderBody) throws Exception {
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +//        String notifyUrl = ""; //异步通知地址
 | 
	
		
			
				|  |  | +//        String returnUrl = ""; //还回地址
 | 
	
		
			
				|  |  | +//        String orderBody = "大雅乐盟培训课程";//订单内容
 | 
	
		
			
				|  |  | +//        String orderSubject = "培训订单";//订单标题
 | 
	
		
			
				|  |  | +//        String orderNo = "2019121263844";//订单编号
 | 
	
		
			
				|  |  | +//        BigDecimal amount = new BigDecimal("654369"); //订单金额
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        String payUrl = "https://qyfapi.95epay.com/api/api/hPay/toPayHtml";//支付提交地址
 | 
	
		
			
				|  |  | +        String payChannels = "{\"weChatPay\":true,\"weChatPayMobile\":false,\"aliPay\":true,\"fastpayXy\":true,\"aliPayMobile\":false,\"balancePay\":false}";//支付方式配置
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        List<Map> tempRoutingList = new ArrayList();
 | 
	
		
			
				|  |  |  //        Map<String, Object> routingList = new HashMap<>();
 | 
	
		
			
				|  |  |  //        routingList.put("routingMerNo", routingAccount.getSellerNo());//分佣账户
 | 
	
		
			
				|  |  | -////      routingList.put("routingFee", order.getAmount()); //分佣金额
 | 
	
		
			
				|  |  |  //        routingList.put("routingFee", order.getAmount().subtract((order.getAmount().multiply(new BigDecimal(0.28)).divide(new BigDecimal(100))).setScale(2, BigDecimal.ROUND_HALF_UP))); //分佣金额
 | 
	
		
			
				|  |  |  //        tempRoutingList.add(routingList);
 | 
	
		
			
				|  |  | -//
 | 
	
		
			
				|  |  | -//        /*订单信息*/
 | 
	
		
			
				|  |  | -//        String orderBody = "大雅乐盟培训课程";
 | 
	
		
			
				|  |  | -//        /*订单标题*/
 | 
	
		
			
				|  |  | -//        String orderSubject = "培训订单";
 | 
	
		
			
				|  |  | -//
 | 
	
		
			
				|  |  | -//        Map<String, Object> resultMap = new LinkedHashMap<String, Object>();
 | 
	
		
			
				|  |  | -//        resultMap.put("sellerNo", "0021677"); //收款商户号
 | 
	
		
			
				|  |  | -//        resultMap.put("payChannels", payChannels); //支付方式
 | 
	
		
			
				|  |  | -//        resultMap.put("orderBody", orderBody); //订单信息
 | 
	
		
			
				|  |  | -//        resultMap.put("payAmount", order.getAmount()); //支付金额
 | 
	
		
			
				|  |  | -//        resultMap.put("apiPayType", "1"); //*API支付类型1-即时支付,2-担保支付,3-预授权支付*/
 | 
	
		
			
				|  |  | -//        resultMap.put("tradeType", "0"); //*交易类型1—充值,0—收款*
 | 
	
		
			
				|  |  | -//        resultMap.put("merMerOrderNo", order.getOrderNo()); //商户订单号
 | 
	
		
			
				|  |  | -//        resultMap.put("orderSubject", orderSubject); //订单标题
 | 
	
		
			
				|  |  | -//        resultMap.put("returnUrl", returnUrl); //前台页面地址
 | 
	
		
			
				|  |  | -//        resultMap.put("tempRoutingList", JSON.toJSONString(tempRoutingList));//分账设置
 | 
	
		
			
				|  |  | -//        Map rqMap = new YqPayUtil(notifyUrl, resultMap).getRequestMap();
 | 
	
		
			
				|  |  | -//        rqMap.put("host", payUrl);
 | 
	
		
			
				|  |  | -//        return rqMap;
 | 
	
		
			
				|  |  | -//    }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        Map<String, Object> resultMap = new LinkedHashMap<String, Object>();
 | 
	
		
			
				|  |  | +        resultMap.put("sellerNo", "0021677"); //收款商户号
 | 
	
		
			
				|  |  | +        resultMap.put("payChannels", payChannels); //支付方式
 | 
	
		
			
				|  |  | +        resultMap.put("orderBody", orderBody); //订单信息
 | 
	
		
			
				|  |  | +        resultMap.put("payAmount", amount); //支付金额
 | 
	
		
			
				|  |  | +        resultMap.put("apiPayType", "1"); //*API支付类型1-即时支付,2-担保支付,3-预授权支付*/
 | 
	
		
			
				|  |  | +        resultMap.put("tradeType", "0"); //*交易类型1—充值,0—收款*
 | 
	
		
			
				|  |  | +        resultMap.put("merMerOrderNo", orderNo); //商户订单号
 | 
	
		
			
				|  |  | +        resultMap.put("orderSubject", orderSubject); //订单标题
 | 
	
		
			
				|  |  | +        resultMap.put("returnUrl", returnUrl); //前台页面地址
 | 
	
		
			
				|  |  | +        resultMap.put("tempRoutingList", JSON.toJSONString(tempRoutingList));//分账设置
 | 
	
		
			
				|  |  | +        Map rqMap = new YqPayUtil(notifyUrl, resultMap).requestMap;
 | 
	
		
			
				|  |  | +        rqMap.put("host", payUrl);
 | 
	
		
			
				|  |  | +        return rqMap;
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  }
 |