Yimaru-BackEnd/internal/services/chapa/port.go

23 lines
940 B
Go

package chapa
import (
"context"
"github.com/SamuelTariku/FortuneBet-Backend/internal/domain"
)
// type ChapaPort interface {
// HandleChapaTransferWebhook(ctx context.Context, req domain.ChapaWebHookTransfer) error
// HandleChapaPaymentWebhook(ctx context.Context, req domain.ChapaWebHookPayment) error
// WithdrawUsingChapa(ctx context.Context, userID int64, req domain.ChapaWithdrawRequest) error
// DepositUsingChapa(ctx context.Context, userID int64, req domain.ChapaDepositRequest) (string, error)
// GetSupportedBanks() ([]domain.ChapaSupportedBank, error)
// }
type ChapaStore interface {
InitializePayment(request domain.ChapaDepositRequest) (domain.ChapaDepositResponse, error)
VerifyPayment(reference string) (domain.ChapaDepositVerification, error)
ManualVerifyPayment(ctx context.Context, txRef string) (*domain.ChapaVerificationResponse, error)
FetchSupportedBanks(ctx context.Context) ([]domain.Bank, error)
}