public static UnifiedorderResult payUnifiedorder(Unifiedorder unifiedorder,String key){
		Map<String,String> map = MapUtil.objectToMap(unifiedorder, "detail", "scene_info");
		//@since 2.8.8 detail 字段签名处理
		if(unifiedorder.getDetail() != null){
			map.put("detail",JsonUtil.toJSONString(unifiedorder.getDetail()));
		}
		//@since 2.8.21 scene_info 字段签名处理
		if(unifiedorder.getScene_info() != null){
			map.put("scene_info",JsonUtil.toJSONString(unifiedorder.getScene_info()));
		}
		if(key != null){
			String sign = SignatureUtil.generateSign(map,unifiedorder.getSign_type(),key);
			unifiedorder.setSign(sign);
		}
		String unifiedorderXML = XMLConverUtil.convertToXML(unifiedorder);
		HttpUriRequest httpUriRequest = RequestBuilder.post()
										.setHeader(xmlHeader)
										.setUri(baseURI()+ "/pay/unifiedorder")
										.setEntity(new StringEntity(unifiedorderXML,Charset.forName("utf-8")))
										.build();
		return LocalHttpClient.executeXmlResult(httpUriRequest,UnifiedorderResult.class,unifiedorder.getSign_type(),key);
	}
public static UnifiedorderResult payUnifiedorder ( Unifiedorder unifiedorder , String key ) { Map < String , String > map = MapUtil . objectToMap ( unifiedorder , "detail" , "scene_info" ) ; if ( unifiedorder . getDetail ( ) != null ) { map . put ( "detail" , JsonUtil . toJSONString ( unifiedorder . getDetail ( ) ) ) ; } if ( unifiedorder . getScene_info ( ) != null ) { map . put ( "scene_info" , JsonUtil . toJSONString ( unifiedorder . getScene_info ( ) ) ) ; } if ( key != null ) { String sign = SignatureUtil . generateSign ( map , unifiedorder . getSign_type ( ) , key ) ; unifiedorder . setSign ( sign ) ; } String unifiedorderXML = XMLConverUtil . convertToXML ( unifiedorder ) ; HttpUriRequest httpUriRequest = RequestBuilder . post ( ) . setHeader ( xmlHeader ) . setUri ( baseURI ( ) + "/pay/unifiedorder" ) . setEntity ( new StringEntity ( unifiedorderXML , Charset . forName ( "utf-8" ) ) ) . build ( ) ; return LocalHttpClient . executeXmlResult ( httpUriRequest , UnifiedorderResult . class , unifiedorder . getSign_type ( ) , key ) ; }
统一下单
@param unifiedorder unifiedorder
@param key key
@return UnifiedorderResult