payments

package
v0.0.0-...-f154cc1 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2017 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MPayment

type MPayment interface {
	CreditWallet(request MPaymentRequest) MPaymentResponse
	DebitWallet(request MPaymentRequest) MPaymentResponse
}

type MPaymentRequest

type MPaymentRequest interface {
	GetName() string
	GetNumber() string
	GetAmount() float64
	GetNetwork() string
	GetReferenceID() string
	GetReceiveToken() string
	GetType() string
}

type MPaymentResponse

type MPaymentResponse interface {
	IsError() bool
	Error() string
	GetResponseData() interface{}
	GetTransactionID() string
	GetNetworkID() string
}

type ProviderResponse

type ProviderResponse interface {
	GetProviderID() string
	GetResponse() interface{}
	GetTransactionID() string
}

type Request

type Request struct {
	Name         string  `json:"name,omitempty"`
	MobileNumber string  `json:"phoneNumber"`
	Amount       float64 `json:"amount,omitempty"`
	MNO          string  `json:"mno,omitempty"`

	Type string `json:"type"`
	// contains filtered or unexported fields
}

func NewReqeust

func NewReqeust() *Request

func (*Request) GetAmount

func (m *Request) GetAmount() float64

func (*Request) GetName

func (m *Request) GetName() string

func (*Request) GetNetwork

func (m *Request) GetNetwork() string

func (*Request) GetNumber

func (m *Request) GetNumber() string

func (*Request) GetReceiveToken

func (m *Request) GetReceiveToken() string

func (*Request) GetReferenceID

func (m *Request) GetReferenceID() string

func (*Request) GetType

func (m *Request) GetType() string

type Response

type Response struct {
	Status  string
	Message string
	// contains filtered or unexported fields
}

func NewResponse

func NewResponse(data ProviderResponse, err error) *Response

func (*Response) Error

func (response *Response) Error() string

func (*Response) GetNetworkID

func (response *Response) GetNetworkID() string

func (*Response) GetResponseData

func (response *Response) GetResponseData() interface{}

func (*Response) GetTransactionID

func (response *Response) GetTransactionID() string

func (*Response) IsError

func (response *Response) IsError() bool

type TransferRequest

type TransferRequest struct {
	*Request
	From string `json:"from"`
	To   string `json:"to"`
}

func NewTransferRequest

func NewTransferRequest() *TransferRequest

Jump to

Keyboard shortcuts

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