mirror of
https://github.com/hanzo-fi/payments.git
synced 2026-10-30 20:31:20 +00:00
19 lines
435 B
Plaintext
19 lines
435 B
Plaintext
package {{ .Connector }}
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/formancehq/payments/internal/models"
|
|
)
|
|
|
|
func (p *Plugin) validateTransferPayoutRequests(pi models.PSPPaymentInitiation) error {
|
|
if pi.SourceAccount == nil {
|
|
return fmt.Errorf("source account is required: %w", models.ErrInvalidRequest)
|
|
}
|
|
|
|
if pi.DestinationAccount == nil {
|
|
return fmt.Errorf("destination account is required: %w", models.ErrInvalidRequest)
|
|
}
|
|
|
|
return nil
|
|
} |