public static SandboxSignkey sandboxnewPayGetsignkey(String mch_id,String key){
		MchBaseResult mchBaseResult = new MchBaseResult();
		mchBaseResult.setMch_id(mch_id);
		mchBaseResult.setNonce_str(UUID.randomUUID().toString().replace("-", ""));
		Map<String,String> map = MapUtil.objectToMap(mchBaseResult);
		String sign = SignatureUtil.generateSign(map,mchBaseResult.getSign_type(),key);
		mchBaseResult.setSign(sign);
		String closeorderXML = XMLConverUtil.convertToXML(mchBaseResult);
		HttpUriRequest httpUriRequest = RequestBuilder.post()
				.setHeader(xmlHeader)
				.setUri(MCH_URI + "/sandboxnew/pay/getsignkey")
				.setEntity(new StringEntity(closeorderXML,Charset.forName("utf-8")))
				.build();
		return LocalHttpClient.executeXmlResult(httpUriRequest, SandboxSignkey.class, mchBaseResult.getSign_type(), key);
	}
public static SandboxSignkey sandboxnewPayGetsignkey ( String mch_id , String key ) { MchBaseResult mchBaseResult = new MchBaseResult ( ) ; mchBaseResult . setMch_id ( mch_id ) ; mchBaseResult . setNonce_str ( UUID . randomUUID ( ) . toString ( ) . replace ( "-" , "" ) ) ; Map < String , String > map = MapUtil . objectToMap ( mchBaseResult ) ; String sign = SignatureUtil . generateSign ( map , mchBaseResult . getSign_type ( ) , key ) ; mchBaseResult . setSign ( sign ) ; String closeorderXML = XMLConverUtil . convertToXML ( mchBaseResult ) ; HttpUriRequest httpUriRequest = RequestBuilder . post ( ) . setHeader ( xmlHeader ) . setUri ( MCH_URI + "/sandboxnew/pay/getsignkey" ) . setEntity ( new StringEntity ( closeorderXML , Charset . forName ( "utf-8" ) ) ) . build ( ) ; return LocalHttpClient . executeXmlResult ( httpUriRequest , SandboxSignkey . class , mchBaseResult . getSign_type ( ) , key ) ; }
获取仿真测试验签秘钥
@param mch_id mch_id
@param key key
@return sandbox_signkey
@since 2.8.13