|
@@ -7,9 +7,13 @@ import com.alibaba.fastjson.JSON;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.ym.mec.thirdparty.exception.ThirdpartyException;
|
|
import com.ym.mec.thirdparty.exception.ThirdpartyException;
|
|
|
|
|
|
|
|
+import org.slf4j.Logger;
|
|
|
|
+import org.slf4j.LoggerFactory;
|
|
import org.springframework.util.DigestUtils;
|
|
import org.springframework.util.DigestUtils;
|
|
|
|
|
|
public class Payment {
|
|
public class Payment {
|
|
|
|
+
|
|
|
|
+ private final static Logger LOGGER = LoggerFactory.getLogger(Payment.class);
|
|
/**
|
|
/**
|
|
* 执行一个支付交易
|
|
* 执行一个支付交易
|
|
*
|
|
*
|
|
@@ -18,10 +22,14 @@ public class Payment {
|
|
*/
|
|
*/
|
|
public static Map<String, Object> executePayment(Map<String, Object> paymentParams) throws Exception {
|
|
public static Map<String, Object> executePayment(Map<String, Object> paymentParams) throws Exception {
|
|
paymentParams.put("app_id", ConfigInit.appId);
|
|
paymentParams.put("app_id", ConfigInit.appId);
|
|
|
|
+
|
|
|
|
+ LOGGER.info("汇付[创建支付对象] Req:{}", paymentParams);
|
|
|
|
|
|
//调用sdk方法,创建支付,得到支付对象
|
|
//调用sdk方法,创建支付,得到支付对象
|
|
Map<String, Object> payment = new HashMap<>();
|
|
Map<String, Object> payment = new HashMap<>();
|
|
payment = com.huifu.adapay.model.Payment.create(paymentParams);
|
|
payment = com.huifu.adapay.model.Payment.create(paymentParams);
|
|
|
|
+
|
|
|
|
+ LOGGER.info("汇付[创建支付对象] Resp:{}", payment);
|
|
|
|
|
|
String errorCode = (String) payment.get("error_code");
|
|
String errorCode = (String) payment.get("error_code");
|
|
if (null != errorCode) {
|
|
if (null != errorCode) {
|