public static MchPayApp generateMchAppData(String prepay_id, String appId, String partnerid, String key) {
		Map<String, String> wx_map = new LinkedHashMap<String, String>();
		wx_map.put("appid", appId);
		wx_map.put("partnerid", partnerid);
		wx_map.put("prepayid", prepay_id);
		wx_map.put("package", "Sign=WXPay");
		wx_map.put("noncestr", UUID.randomUUID().toString().replace("-", ""));
		wx_map.put("timestamp", System.currentTimeMillis() / 1000 + "");
		String sign = SignatureUtil.generateSign(wx_map, key);
		MchPayApp mchPayApp = new MchPayApp();
		mchPayApp.setAppid(appId);
		mchPayApp.setPartnerid(partnerid);
		mchPayApp.setPrepayid(prepay_id);
		mchPayApp.setPackage_(wx_map.get("package"));
		mchPayApp.setNoncestr(wx_map.get("noncestr"));
		mchPayApp.setTimestamp(wx_map.get("timestamp"));
		mchPayApp.setSign(sign);
		return mchPayApp;
	}
public static MchPayApp generateMchAppData ( String prepay_id , String appId , String partnerid , String key ) { Map < String , String > wx_map = new LinkedHashMap < String , String > ( ) ; wx_map . put ( "appid" , appId ) ; wx_map . put ( "partnerid" , partnerid ) ; wx_map . put ( "prepayid" , prepay_id ) ; wx_map . put ( "package" , "Sign=WXPay" ) ; wx_map . put ( "noncestr" , UUID . randomUUID ( ) . toString ( ) . replace ( "-" , "" ) ) ; wx_map . put ( "timestamp" , System . currentTimeMillis ( ) / 1000 + "" ) ; String sign = SignatureUtil . generateSign ( wx_map , key ) ; MchPayApp mchPayApp = new MchPayApp ( ) ; mchPayApp . setAppid ( appId ) ; mchPayApp . setPartnerid ( partnerid ) ; mchPayApp . setPrepayid ( prepay_id ) ; mchPayApp . setPackage_ ( wx_map . get ( "package" ) ) ; mchPayApp . setNoncestr ( wx_map . get ( "noncestr" ) ) ; mchPayApp . setTimestamp ( wx_map . get ( "timestamp" ) ) ; mchPayApp . setSign ( sign ) ; return mchPayApp ; }
(MCH)生成支付APP请求数据

@param prepay_id
预支付订单号
@param appId
appId
@param partnerid
商户平台号
@param key
商户支付密钥
@return app data