Documentation ¶
Index ¶
- type Broker
- func (b *Broker) CreditWallet(requestDetails payments.MPaymentRequest) payments.MPaymentResponse
- func (b *Broker) DebitWallet(requestDetails payments.MPaymentRequest) payments.MPaymentResponse
- func (b *Broker) NewError(err interface{}) error
- func (b *Broker) NewRequest(data interface{}) payments.MPaymentResponse
- type Request
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Broker ¶
type Broker struct { ClientId string ClientSecret string Token string BaseURL string BrokerSender string CallbackURL string }
func (*Broker) CreditWallet ¶
func (b *Broker) CreditWallet(requestDetails payments.MPaymentRequest) payments.MPaymentResponse
func (*Broker) DebitWallet ¶
func (b *Broker) DebitWallet(requestDetails payments.MPaymentRequest) payments.MPaymentResponse
func (*Broker) NewRequest ¶
func (b *Broker) NewRequest(data interface{}) payments.MPaymentResponse
type Request ¶
type Request struct { MSISDN string `json:"receiverPhone"` ReceiverName string `json:"receiverName"` Amount float64 `json:"amount"` ForeignID string `json:"foreignId,omitempty"` Provider string `json:"provider"` Sender string `json:"sender"` Token string `json:"token"` ReceiveToken string `json:"receiveToken,omitempty"` Type string `json:"type"` CallbackURL string `json:"callbackUrl"` }
type Response ¶
type Response struct { ID string `json:"Id,omitempty"` Customer string `json:"Customer,omitempty"` ForeignID string `json:"ForeignId,omitempty"` ProviderID string `json:"ProviderId,omitempty"` ErrorCode string `json:"ErrorCode,omitempty"` Description string `json:"Description,omitempty"` }
func (Response) GetProviderID ¶
func (Response) GetResponse ¶
func (r Response) GetResponse() interface{}
func (Response) GetTransactionID ¶
Click to show internal directories.
Click to hide internal directories.