|
@@ -5,7 +5,8 @@ import java.util.*;
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
-import com.huifu.adapay.core.exception.BaseAdaPayException;
|
|
|
+import com.ym.mec.thirdparty.exception.ThirdpartyException;
|
|
|
+
|
|
|
import org.springframework.util.DigestUtils;
|
|
|
|
|
|
public class Payment {
|
|
@@ -25,7 +26,7 @@ public class Payment {
|
|
|
String errorCode = (String) payment.get("error_code");
|
|
|
if (null != errorCode) {
|
|
|
String errorMsg = (String) payment.get("error_msg");
|
|
|
- throw new BaseAdaPayException(errorMsg);
|
|
|
+ throw new ThirdpartyException(errorMsg);
|
|
|
}
|
|
|
|
|
|
return payment;
|
|
@@ -52,7 +53,7 @@ public class Payment {
|
|
|
paymentParams.put("notify_url", "notify_url");
|
|
|
System.out.println("关单请求参数:" + JSON.toJSONString(paymentId));
|
|
|
payment = com.huifu.adapay.model.Payment.close(paymentParams);
|
|
|
- } catch (BaseAdaPayException e) {
|
|
|
+ } catch (ThirdpartyException e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
|
|
@@ -83,7 +84,7 @@ public class Payment {
|
|
|
try {
|
|
|
System.out.println("支付查询请求参数:" + JSON.toJSONString(paymentId));
|
|
|
payment = com.huifu.adapay.model.Payment.query(paymentId);
|
|
|
- } catch (BaseAdaPayException e) {
|
|
|
+ } catch (ThirdpartyException e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
|
|
@@ -110,7 +111,7 @@ public class Payment {
|
|
|
String error_code = (String) payment.get("error_code");
|
|
|
if (null != error_code) {
|
|
|
String errorMsg = (String) payment.get("error_msg");
|
|
|
- throw new BaseAdaPayException(errorMsg);
|
|
|
+ throw new ThirdpartyException(errorMsg);
|
|
|
}
|
|
|
return payment;
|
|
|
}
|