Reapply "feat(loyalty): EnakPoint & EnakCoin" (#32)
This reverts commit 4e24f9bbb0.
This commit is contained in:
@@ -557,7 +557,8 @@ func (s *OrderServiceImpl) validateCreatePaymentRequest(req *models.CreatePaymen
|
||||
return fmt.Errorf("payment method ID is required")
|
||||
}
|
||||
|
||||
if req.Amount <= 0 {
|
||||
// A payment with EnakPoint gives points instead; its amount is computed from them.
|
||||
if req.Points == nil && req.Amount <= 0 {
|
||||
return fmt.Errorf("payment amount must be greater than zero")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user