记得上下班打卡 | git大法好,push需谨慎

Commit a4c37a06 authored by 胡佳晨's avatar 胡佳晨

提交 微信退款接口

parent 2d6f06c7
...@@ -18,7 +18,7 @@ public interface IDragonOrderRefundsService { ...@@ -18,7 +18,7 @@ public interface IDragonOrderRefundsService {
* @param price 退款金额 * @param price 退款金额
* @param paymentType 支付类型 * @param paymentType 支付类型
*/ */
ResponseDto<DragonRefundAppDto> dragonRefund(String orderCode, String tradeNo, String outTradeNo, String reason, String returnUrl, BigDecimal price, String paymentType,String paymentId); ResponseDto<DragonRefundAppDto> dragonRefund(String orderCode, String tradeNo, String outTradeNo, String reason, String returnUrl, BigDecimal price, String paymentType,String paymentId,BigDecimal priceTotal);
ResponseDto<DragonRefundAppDto> wePayRefundCallBack(); ResponseDto<DragonRefundAppDto> wePayRefundCallBack();
......
package com.liquidnet.service.dragon.channel.wepay.resp;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import lombok.Data;
@Data
@XStreamAlias("xml")
public class WePayRefundReturnDto {
@XStreamAlias("return_code")
private String returnCode;
@XStreamAlias("return_msg")
private String returnMsg;
@XStreamAlias("appid")
private String appId;
@XStreamAlias("mch_id")
private String mchId;
@XStreamAlias("nonce_str")
private String nonceStr;
@XStreamAlias("sign")
private String sign;
@XStreamAlias("result_code")
private String resultCode;
@XStreamAlias("transaction_id")
private String transactionId;
@XStreamAlias("out_trade_no")
private String outTradeNo;
@XStreamAlias("out_refund_no")
private String outRefundNo;
@XStreamAlias("refund_id")
private String refundId;
@XStreamAlias("refund_channel")
private String refundChannel;
@XStreamAlias("refund_fee")
private String refundFee;
@XStreamAlias("coupon_refund_fee")
private String couponRefundFee;
@XStreamAlias("total_fee")
private String totalFee;
@XStreamAlias("cash_fee")
private String cashFee;
@XStreamAlias("coupon_refund_count")
private String couponRefundCount;
@XStreamAlias("cash_refund_fee")
private String cashRefundFee;
}
...@@ -41,9 +41,10 @@ public class RefundController { ...@@ -41,9 +41,10 @@ public class RefundController {
@RequestParam(value = "orderRefundCode") @NotNull(message = "退款单号不能为空") String orderRefundCode, @RequestParam(value = "orderRefundCode") @NotNull(message = "退款单号不能为空") String orderRefundCode,
@RequestParam(value = "reason") @NotNull(message = "退款原因不能为空") String reason, @RequestParam(value = "reason") @NotNull(message = "退款原因不能为空") String reason,
@RequestParam(value = "notifyUrl") @NotNull(message = "回调地址不能为空") String returnUrl, @RequestParam(value = "notifyUrl") @NotNull(message = "回调地址不能为空") String returnUrl,
@RequestParam(value = "price") @NotNull(message = "价格不能为空") BigDecimal price, @RequestParam(value = "price") @NotNull(message = "退款价格不能为空") BigDecimal price,
@RequestParam(value = "priceTotal") @NotNull(message = "订单价格不能为空") BigDecimal priceTotal,
@RequestParam(value = "paymentType") @NotNull(message = "支付类型不能为空") String paymentType, @RequestParam(value = "paymentType") @NotNull(message = "支付类型不能为空") String paymentType,
@RequestParam(value = "paymentId") @NotNull(message = "支付订单号不能为空") String paymentId) { @RequestParam(value = "paymentId") @NotNull(message = "支付订单号不能为空") String paymentId) {
return orderRefundsService.dragonRefund(orderCode, code, orderRefundCode, reason, returnUrl, price, paymentType, paymentId); return orderRefundsService.dragonRefund(orderCode, code, orderRefundCode, reason, returnUrl, price, paymentType, paymentId, priceTotal);
} }
} }
...@@ -2,10 +2,12 @@ package com.liquidnet.service.dragon.utils; ...@@ -2,10 +2,12 @@ package com.liquidnet.service.dragon.utils;
import com.alipay.api.internal.util.file.IOUtils; import com.alipay.api.internal.util.file.IOUtils;
import com.liquidnet.commons.lang.util.MD5Utils; import com.liquidnet.commons.lang.util.MD5Utils;
import com.liquidnet.service.dragon.channel.wepay.resp.WePayRefundReturnDto;
import org.apache.http.conn.ssl.SSLConnectionSocketFactory; import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients; import org.apache.http.impl.client.HttpClients;
import org.apache.http.ssl.SSLContexts; import org.apache.http.ssl.SSLContexts;
import org.dom4j.DocumentException;
import javax.net.ssl.SSLContext; import javax.net.ssl.SSLContext;
import java.io.ByteArrayInputStream; import java.io.ByteArrayInputStream;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment