| @@ -512,8 +512,8 @@ public class WxCarController extends BaseController { | |||||
| String uniquePayOrderNo = carVendor.getMessage()+"_"+idWorker.nextId(); | String uniquePayOrderNo = carVendor.getMessage()+"_"+idWorker.nextId(); | ||||
| String apiKey = (String)receiver.getReceiverParamValue(Constant.paymentReceicerParamApiKey); | String apiKey = (String)receiver.getReceiverParamValue(Constant.paymentReceicerParamApiKey); | ||||
| String attach = attachSb.toString(); | String attach = attachSb.toString(); | ||||
| //String productPre = new String("停车费支付,车场订单号".getBytes("ISO-8859-1"), "UTF-8");//中文签名错误 | |||||
| String productPre = "ParkOrderId"; | |||||
| String productPre = "停车费支付,车场订单号";//中文签名错误 | |||||
| //String productPre = "ParkOrderId"; | |||||
| PayAdapterResult wxResult = wxParkPayService.createWxPayOrder(park,isIsv,false,user.getOpenId(), user.getAppId(), receiver.getReceiverAccount(), productPre+payOrder.getParkOrderNumber(), attach, uniquePayOrderNo, payOrder.getFee(), | PayAdapterResult wxResult = wxParkPayService.createWxPayOrder(park,isIsv,false,user.getOpenId(), user.getAppId(), receiver.getReceiverAccount(), productPre+payOrder.getParkOrderNumber(), attach, uniquePayOrderNo, payOrder.getFee(), | ||||
| "127.0.0.1", park.getPaidCallBack(), apiKey, new Date()); | "127.0.0.1", park.getPaidCallBack(), apiKey, new Date()); | ||||
| return new ResultData(wxResult); | return new ResultData(wxResult); | ||||
| @@ -500,7 +500,12 @@ public class WxPayment { | |||||
| xml.append("</").append(key).append(">"); | xml.append("</").append(key).append(">"); | ||||
| } | } | ||||
| xml.append("</xml>"); | xml.append("</xml>"); | ||||
| return xml.toString(); | |||||
| try { | |||||
| return new String(xml.toString().getBytes("utf-8"),"IOS8859-1"); | |||||
| } catch (UnsupportedEncodingException e) { | |||||
| e.printStackTrace(); | |||||
| return null; | |||||
| } | |||||
| } | } | ||||
| /** | /** | ||||
| @@ -279,6 +279,7 @@ public class WxMiniAppPayAdapterService extends BaseWxPayV2AdapterService implem | |||||
| public PayAdapterResult pay(String openId,String appId,String mchId,String productName,String attach,String payOrderNo,Integer fee,String ip,String notifyUrl,String apiKey,Date currentDate) throws Exception { | public PayAdapterResult pay(String openId,String appId,String mchId,String productName,String attach,String payOrderNo,Integer fee,String ip,String notifyUrl,String apiKey,Date currentDate) throws Exception { | ||||
| WxPayOrderP wxPayOrderP = generateWxPayOrderP(openId, appId, mchId, productName, attach, payOrderNo, fee, ip, notifyUrl, apiKey, currentDate,null); | WxPayOrderP wxPayOrderP = generateWxPayOrderP(openId, appId, mchId, productName, attach, payOrderNo, fee, ip, notifyUrl, apiKey, currentDate,null); | ||||
| log.info(">>>>> payorder >>>>"+wxPayOrderP.toString() ); | |||||
| String response = WxPay.pushOrder(BeanUtils.toStringMap(wxPayOrderP)); | String response = WxPay.pushOrder(BeanUtils.toStringMap(wxPayOrderP)); | ||||
| log.info("pay order, wechat pushOrder, " + wxPayOrderP.toString() + ", response: " + response.toString()); | log.info("pay order, wechat pushOrder, " + wxPayOrderP.toString() + ", response: " + response.toString()); | ||||
| Map<String, String> returnMap = WxPayment.xmlToMap(response); | Map<String, String> returnMap = WxPayment.xmlToMap(response); | ||||