callback

package
v0.0.0-...-1305305 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	GOOD_DISPOSITION           = "OK"
	BAD_DISPOSITION            = "DENIED"
	INVALID_ACCOUNT_IDENTIFIER = "Bad Account Identifier"
)
View Source
var LOGGER = logging.MustGetLogger("callback")

Functions

func GetCursor

func GetCursor(cl NotifyPaymentClient, accountName string) (cursor model.Cursor, err error)

func PostPayment

func PostPayment(cl NotifyPaymentClient, pNotification model.Receive) (err error)

Types

type MockNotifyPaymentClient

type MockNotifyPaymentClient struct {
	NotifyPaymentURL string
	GetCursorURL     string
}

func CreateMockNotifyPaymentClient

func CreateMockNotifyPaymentClient() (MockNotifyPaymentClient, error)

func (MockNotifyPaymentClient) GetLastCursor

func (client MockNotifyPaymentClient) GetLastCursor(string) (cursor model.Cursor, err error)

func (MockNotifyPaymentClient) NotifyPayment

func (client MockNotifyPaymentClient) NotifyPayment(pNotification model.Receive) error

type NotifyPaymentClient

type NotifyPaymentClient interface {
	NotifyPayment(model.Receive) error
	GetLastCursor(string) (cursor model.Cursor, err error)
}

type RestNotifyPaymentClient

type RestNotifyPaymentClient struct {
	GetCursorURL string
}

func (RestNotifyPaymentClient) GetLastCursor

func (client RestNotifyPaymentClient) GetLastCursor(accountName string) (cursor model.Cursor, err error)

Jump to

Keyboard shortcuts

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