feat(payment): 增加支付配置测试支付与全链路报文

This commit is contained in:
2026-11-20 14:51:17 +08:00
parent b539e3a42f
commit 8fec2fa5a2
19 changed files with 2353 additions and 5 deletions
@@ -0,0 +1,44 @@
package payment
import "context"
func (s *Service) StartConfigTestPayment(ctx context.Context, configID uint64, req StartConfigTestPaymentRequest, adminID uint64, clientIP string) (*ConfigTestPaymentDTO, error) {
if s.repo == nil {
return nil, ErrDependencyUnavailable
}
return s.repo.StartConfigTestPayment(ctx, configID, req, adminID, clientIP)
}
func (s *Service) ListConfigTestPayments(ctx context.Context, query ConfigTestPaymentQuery) (*ConfigTestPaymentListResponse, error) {
if s.repo == nil {
return nil, ErrDependencyUnavailable
}
return s.repo.ListConfigTestPayments(ctx, query)
}
func (s *Service) GetConfigTestPayment(ctx context.Context, id uint64) (*ConfigTestPaymentDTO, error) {
if s.repo == nil {
return nil, ErrDependencyUnavailable
}
return s.repo.GetConfigTestPayment(ctx, id)
}
func (s *Service) RefreshConfigTestPayment(ctx context.Context, id uint64) (*ConfigTestPaymentDTO, error) {
if s.repo == nil {
return nil, ErrDependencyUnavailable
}
return s.repo.RefreshConfigTestPayment(ctx, id)
}
func (s *Service) HandleConfigTestNotify(ctx context.Context, provider string, notifyToken string, params map[string]string, rawPayload string, contentType string, authorization string) (*NotifyResult, error) {
if s.repo == nil {
return nil, ErrDependencyUnavailable
}
return s.repo.HandleConfigTestNotify(ctx, provider, notifyToken, params, rawPayload, contentType, authorization)
}
func (s *Service) RecordConfigTestNotifyAck(ctx context.Context, provider string, notifyToken string, ack string) error {
if s.repo == nil {
return ErrDependencyUnavailable
}
return s.repo.RecordConfigTestNotifyAck(ctx, provider, notifyToken, ack)
}