Преглед на файлове

Merge pull request #241 from videome/develop

Improve error message of the failure of getting prepayid.
master
Daniel Qian преди 9 години
родител
ревизия
89a260dded
променени са 1 файла, в които са добавени 2 реда и са изтрити 3 реда
  1. +2
    -3
      weixin-java-mp/src/main/java/me/chanjar/weixin/mp/api/WxMpServiceImpl.java

+ 2
- 3
weixin-java-mp/src/main/java/me/chanjar/weixin/mp/api/WxMpServiceImpl.java Целия файл

@@ -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>();


Зареждане…
Отказ
Запис