service

package
v0.0.0-...-7544875 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 31, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OPORepository

type OPORepository interface {
	Paid(ctx context.Context, phoneNumber string) (string, error)
}

type OrderRepository

type OrderRepository interface {
	Placed(ctx context.Context, paymentTrxID string) error
}

type Payment

type Payment struct {
	// contains filtered or unexported fields
}

func NewPayment

func NewPayment(payment PaymentRepository, opo OPORepository, order OrderRepository) *Payment

func (*Payment) ByPaymentTrxID

func (p *Payment) ByPaymentTrxID(ctx context.Context, paymentTrxID string) (payment.Payment, error)

func (*Payment) OPOPaid

func (p *Payment) OPOPaid(ctx context.Context, paymentTrxID string) error

func (*Payment) Register

func (p *Payment) Register(ctx context.Context, payments payment.Payment) (string, error)

type PaymentRepository

type PaymentRepository interface {
	Register(ctx context.Context, params payment.Payment) error
	FindByPaymentTrxID(ctx context.Context, paymentTrxID string) (payment.Payment, error)
	PaidPayment(ctx context.Context, paymentTrxID string) error
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL