diff --git a/pom.xml b/pom.xml
index 5f190c5ca..afcf33741 100644
--- a/pom.xml
+++ b/pom.xml
@@ -10,7 +10,7 @@
4.0.0
manage
- 1.0.27
+ 1.0.28
UTF-8
diff --git a/src/main/java/au/com/royalpay/payment/manage/dev/core/impl/AliforexcelServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/dev/core/impl/AliforexcelServiceImpl.java
index 9e8a5a143..04e8acdfe 100644
--- a/src/main/java/au/com/royalpay/payment/manage/dev/core/impl/AliforexcelServiceImpl.java
+++ b/src/main/java/au/com/royalpay/payment/manage/dev/core/impl/AliforexcelServiceImpl.java
@@ -129,24 +129,31 @@ public class AliforexcelServiceImpl implements AliforexcelService {
lessInfoMerchant.add(exception);
continue;
}
- AlipayConfig.AlipayMerchant mch = AlipayEnvironment.getEnv().getAlipayOnlineMerchant();
- Element resultElement = alipayClient.registerOnlineGmsPortal(mch.getPid(), client);
- if (!StringUtils.equalsIgnoreCase("T", resultElement.elementText("is_success"))) {
- JSONObject exception = new JSONObject();
- exception.put("client_moniker", client.getString("client_moniker"));
- exception.put("return_msg", resultElement.elementText("error"));
- registerFailMerchant.add(exception);
- continue;
- }
- Element responseElement = resultElement.element("response").element("alipay");
- if (!StringUtils.equalsIgnoreCase("SUCCESS", responseElement.elementText("result_code"))) {
+ try {
+ AlipayConfig.AlipayMerchant mch = AlipayEnvironment.getEnv().getAlipayOnlineMerchant();
+ Element resultElement = alipayClient.registerOnlineGmsPortal(mch.getPid(), client);
+ if (!StringUtils.equalsIgnoreCase("T", resultElement.elementText("is_success"))) {
+ JSONObject exception = new JSONObject();
+ exception.put("client_moniker", client.getString("client_moniker"));
+ exception.put("return_msg", resultElement.elementText("error"));
+ registerFailMerchant.add(exception);
+ continue;
+ }
+ Element responseElement = resultElement.element("response").element("alipay");
+ if (!StringUtils.equalsIgnoreCase("SUCCESS", responseElement.elementText("result_code"))) {
+ JSONObject exception = new JSONObject();
+ exception.put("client_moniker", client.getString("client_moniker"));
+ exception.put("return_msg", resultElement.elementText("error"));
+ registerFailMerchant.add(exception);
+ continue;
+ }
+ registerSuccessMerchant.add(client.getString("client_moniker"));
+ } catch (Exception e) {
JSONObject exception = new JSONObject();
exception.put("client_moniker", client.getString("client_moniker"));
- exception.put("return_msg", resultElement.elementText("error"));
+ exception.put("return_msg", e.getMessage());
registerFailMerchant.add(exception);
- continue;
}
- registerSuccessMerchant.add(client.getString("client_moniker"));
}
result.put("need_register_merchant", needRegisterMerchant);
result.put("success_register_merchant", registerSuccessMerchant);