fix if order amount 0

This commit is contained in:
Efril 2026-04-26 23:40:01 +07:00
parent 1a5ddd2b34
commit eb95459578

View File

@ -483,7 +483,7 @@ func (s *OrderServiceImpl) validateCreatePaymentRequest(req *models.CreatePaymen
return fmt.Errorf("order item ID is required for payment item %d", i+1) return fmt.Errorf("order item ID is required for payment item %d", i+1)
} }
if item.Amount <= 0 { if item.Amount < 0 {
return fmt.Errorf("payment item amount must be greater than zero for item %d", i+1) return fmt.Errorf("payment item amount must be greater than zero for item %d", i+1)
} }