improved storing
This commit is contained in:
@@ -107,6 +107,7 @@ func (p *cardPayoutProcessor) Submit(ctx context.Context, req *mntxv1.CardPayout
|
||||
|
||||
// Keep CreatedAt/refs if record already exists.
|
||||
if existing, err := p.store.Payouts().FindByPaymentID(ctx, state.PaymentRef); err == nil && existing != nil {
|
||||
state.ID = existing.ID // preserve ID for upsert
|
||||
if !existing.CreatedAt.IsZero() {
|
||||
state.CreatedAt = existing.CreatedAt
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user