mirror of
https://github.com/hanzo-fi/payments.git
synced 2026-10-30 20:31:20 +00:00
17 lines
328 B
Go
17 lines
328 B
Go
package services
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/formancehq/payments/internal/models"
|
|
)
|
|
|
|
func (s *Service) PaymentsGet(ctx context.Context, id models.PaymentID) (*models.Payment, error) {
|
|
p, err := s.storage.PaymentsGet(ctx, id)
|
|
if err != nil {
|
|
return nil, newStorageError(err, "cannot get payment")
|
|
}
|
|
|
|
return p, nil
|
|
}
|