feat(v2): gateway.Refund 编排(部分/多次累计 + 超退守卫 + crypto 人工向闭环)+ RefundingProvider 加 refundID 幂等键
This commit is contained in:
@@ -109,10 +109,12 @@ type Provider interface {
|
||||
Query(ctx context.Context, req QueryRequest) (*PaidEvent, error)
|
||||
}
|
||||
|
||||
// RefundingProvider — 可选:支持渠道退款的 Provider 额外实现(P4;不支持则 capabilities=false)。
|
||||
// RefundingProvider — 可选:支持渠道退款的 Provider 额外实现(P4)。refundID 为 pay 侧
|
||||
// 退款单号,作渠道幂等键(alipay out_request_no / stripe Idempotency-Key)——同单多次
|
||||
// 部分退款靠它去重,重试不重复退。不支持退款的渠道不实现本接口(capabilities=false)。
|
||||
type RefundingProvider interface {
|
||||
Provider
|
||||
Refund(ctx context.Context, providerRef string, amountMinor int64, reason string) (refundRef string, status PaidStatus, err error)
|
||||
Refund(ctx context.Context, providerRef, refundID string, amountMinor int64, reason string) (refundRef string, status PaidStatus, err error)
|
||||
}
|
||||
|
||||
// RecurringProvider — 可选:支持自动续订(P8,设计 §5.1 4 类 kind)。
|
||||
|
||||
Reference in New Issue
Block a user