mirror of
https://gitee.com/egzosn/pay-java-parent.git
synced 2026-06-08 02:17:20 +08:00
退款结果集统一处理
This commit is contained in:
@@ -4,6 +4,7 @@ package com.egzosn.pay.demo.controller;
|
||||
|
||||
import com.egzosn.pay.ali.api.AliPayConfigStorage;
|
||||
import com.egzosn.pay.ali.api.AliPayService;
|
||||
import com.egzosn.pay.ali.bean.AliRefundResult;
|
||||
import com.egzosn.pay.ali.bean.AliTransactionType;
|
||||
import com.egzosn.pay.ali.bean.AliTransferOrder;
|
||||
import com.egzosn.pay.ali.bean.AliTransferType;
|
||||
@@ -279,7 +280,7 @@ public class AliPayController {
|
||||
* @return 返回支付方申请退款后的结果
|
||||
*/
|
||||
@RequestMapping("refund")
|
||||
public Map<String, Object> refund(RefundOrder order) {
|
||||
public AliRefundResult refund(RefundOrder order) {
|
||||
return service.refund(order);
|
||||
}
|
||||
|
||||
|
||||
@@ -422,7 +422,7 @@ public class PayController {
|
||||
* @return 返回支付方申请退款后的结果
|
||||
*/
|
||||
@RequestMapping("refund")
|
||||
public Map<String, Object> refund(Integer payId, RefundOrder order) {
|
||||
public RefundResult refund(Integer payId, RefundOrder order) {
|
||||
PayResponse payResponse = service.getPayResponse(payId);
|
||||
|
||||
// return payResponse.getService().refund(order.getTradeNo(), order.getOutTradeNo(), order.getRefundAmount(), order.getTotalAmount());
|
||||
|
||||
@@ -5,6 +5,7 @@ import com.egzosn.pay.common.api.PayService;
|
||||
import com.egzosn.pay.common.bean.DefaultCurType;
|
||||
import com.egzosn.pay.common.bean.PayOrder;
|
||||
import com.egzosn.pay.common.bean.RefundOrder;
|
||||
import com.egzosn.pay.common.bean.RefundResult;
|
||||
import com.egzosn.pay.common.http.HttpConfigStorage;
|
||||
import com.egzosn.pay.paypal.api.PayPalConfigStorage;
|
||||
import com.egzosn.pay.paypal.api.PayPalPayService;
|
||||
@@ -86,7 +87,7 @@ public class PayPalPayController {
|
||||
* @return 返回支付方申请退款后的结果
|
||||
*/
|
||||
@RequestMapping("refund")
|
||||
public Map<String, Object> refund() {
|
||||
public RefundResult refund() {
|
||||
// TODO 这里需要 refundAmount, curType, description, tradeNo
|
||||
RefundOrder order = new RefundOrder();
|
||||
order.setCurType(DefaultCurType.USD);
|
||||
|
||||
@@ -12,6 +12,7 @@ import com.egzosn.pay.common.util.sign.SignUtils;
|
||||
import com.egzosn.pay.demo.request.QueryOrder;
|
||||
import com.egzosn.pay.union.api.UnionPayConfigStorage;
|
||||
import com.egzosn.pay.union.api.UnionPayService;
|
||||
import com.egzosn.pay.union.bean.UnionRefundResult;
|
||||
import com.egzosn.pay.union.bean.UnionTransactionType;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
@@ -266,7 +267,7 @@ public class UnionPayController {
|
||||
* @return 返回支付方申请退款后的结果
|
||||
*/
|
||||
@RequestMapping("refund")
|
||||
public Map<String, Object> refund(RefundOrder order) {
|
||||
public UnionRefundResult refund(RefundOrder order) {
|
||||
return service.refund(order);
|
||||
}
|
||||
|
||||
|
||||
@@ -309,7 +309,7 @@ public class WxPayController {
|
||||
* @return 返回支付方申请退款后的结果
|
||||
*/
|
||||
@RequestMapping("refund")
|
||||
public Map<String, Object> refund(RefundOrder order) {
|
||||
public WxRefundResult refund(RefundOrder order) {
|
||||
if("ssl 退款证书".equals(KEYSTORE)){
|
||||
throw new RuntimeException("请设置好SSL退款证书");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user