Files
servicebase/pkg/dto/request/RefundReq.go
2025-11-19 14:24:13 +08:00

31 lines
1020 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package request
import "github.com/shopspring/decimal"
const (
WxPayChannelCode = "WxPay"
AlipayChannelCode = "AliPay"
)
type RefundReq[T any] struct {
TransactionId string // 支付单号
OutTransactionId string // DD game内部唯一支付单号
OutRefundNo string // 退款单号DD Game内部退款唯一单号
Reason string // 退款原因 1、该退款原因参数的长度不得超过80个字节2、当订单退款金额小于等于1元且为部分退款时退款原因将不会在消息中体现。
RefundDetail T
ChannelCode string //渠道 Code WxPay|AliPay
}
type AliPayRefund struct {
RefundAmount decimal.Decimal // 退款金额alipay单位是元(两位小数),此处统一成分
}
type WxPayRefund struct {
RefundAmount decimal.Decimal // 退款金额wx单位是分,alipay单位是元(两位小数),此处统一成分
PayAmount decimal.Decimal // 原支付订单的金额
}
func (req *RefundReq[T]) CheckParameter() (err error) {
return nil
}