mirror of
				https://gitee.com/binary/weixin-java-tools.git
				synced 2025-10-30 10:07:06 +08:00 
			
		
		
		
	Improve error message of the failure of getting prepayid.
This commit is contained in:
		| @ -835,9 +835,8 @@ public class WxMpServiceImpl implements WxMpService { | ||||
|       WxMpPrepayIdResult wxMpPrepayIdResult = (WxMpPrepayIdResult) xstream.fromXML(responseContent); | ||||
|       return wxMpPrepayIdResult; | ||||
|     } catch (IOException e) { | ||||
|       e.printStackTrace(); | ||||
|       throw new RuntimeException("Failed to get prepay id due to IO exception.", e); | ||||
|     } | ||||
|     return new WxMpPrepayIdResult(); | ||||
|   } | ||||
|  | ||||
|   final String[] REQUIRED_ORDER_PARAMETERS = new String[] { "appid", "mch_id", "body", "out_trade_no", "total_fee", "spbill_create_ip", "notify_url", | ||||
| @ -875,7 +874,7 @@ public class WxMpServiceImpl implements WxMpService { | ||||
|     WxMpPrepayIdResult wxMpPrepayIdResult = getPrepayId(parameters); | ||||
|     String prepayId = wxMpPrepayIdResult.getPrepay_id(); | ||||
|     if (prepayId == null || prepayId.equals("")) { | ||||
|       throw new RuntimeException("get prepayid error"); | ||||
|       throw new RuntimeException(String.format("Failed to get prepay id due to error code '%s'(%s).", wxMpPrepayIdResult.getErr_code(), wxMpPrepayIdResult.getErr_code_des())); | ||||
|     } | ||||
|  | ||||
|     Map<String, String> payInfo = new HashMap<String, String>(); | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Kane Zhu
					Kane Zhu