mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 11:35:12 +08:00
查询退款对象
This commit is contained in:
@@ -12,6 +12,7 @@ import com.huifu.adapay.model.*;
|
||||
import com.jsowell.adapay.common.AdaPayment;
|
||||
import com.jsowell.adapay.common.CreateAdaPaymentParam;
|
||||
import com.jsowell.adapay.common.DivMember;
|
||||
import com.jsowell.adapay.common.RefundInfo;
|
||||
import com.jsowell.adapay.config.AbstractAdapayConfig;
|
||||
import com.jsowell.adapay.dto.*;
|
||||
import com.jsowell.adapay.factory.AdapayConfigFactory;
|
||||
@@ -1030,6 +1031,23 @@ public class AdapayService {
|
||||
return payment_reverses;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询支付退款对象
|
||||
*/
|
||||
public List<RefundInfo> queryPaymentRefund(String paymentId, String wechatAppId) throws BaseAdaPayException {
|
||||
AbstractAdapayConfig config = AdapayConfigFactory.getConfig(wechatAppId);
|
||||
if (config == null) {
|
||||
throw new BusinessException(ReturnCodeEnum.CODE_ADAPAY_CONFIG_IS_NULL_ERROR);
|
||||
}
|
||||
Map<String, Object> refundParams = Maps.newHashMap();
|
||||
refundParams.put("payment_id", paymentId);
|
||||
refundParams.put("app_id", config.getAdapayAppId());
|
||||
Map<String, Object> response = Refund.query(refundParams, config.getWechatAppId());
|
||||
PaymentRefundResponse paymentRefundResponse = JSON.parseObject(JSON.toJSONString(response), PaymentRefundResponse.class);
|
||||
List<RefundInfo> refunds = paymentRefundResponse.getRefunds();
|
||||
return refunds;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询支付确认对象列表
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user