Documentation ¶
Index ¶
- Constants
- func SetAccessToken(c *Client, accessToken string)
- func SetOptions(c *Client, opt Options)
- type Auth
- type AuthRequest
- type AuthService
- type Client
- type Fee
- type KeyValue
- type Options
- type TransactionDetails
- type TransactionRequest
- type TransactionResponse
- type TransactionService
- func (s *TransactionService) GetTransactionDetails(transactionID string) (*TransactionDetails, error)
- func (s *TransactionService) GetTransactionStatus(serverCorrelationID string) (*TransactionStatus, error)
- func (s *TransactionService) SendPayment(tx *TransactionRequest) (*TransactionResponse, error)
- type TransactionStatus
Constants ¶
View Source
const PRODUCTION_URL = "https://api.mvola.mg"
View Source
const SANDBOX_URL = "https://devapi.mvola.mg"
Variables ¶
This section is empty.
Functions ¶
func SetAccessToken ¶
func SetOptions ¶
Types ¶
type AuthRequest ¶
type AuthService ¶
type AuthService service
func (*AuthService) GenerateToken ¶
func (s *AuthService) GenerateToken(consumerKey, consumerSecret string) (*Auth, error)
type Client ¶
type Client struct { Auth *AuthService Transaction *TransactionService // contains filtered or unexported fields }
type TransactionDetails ¶
type TransactionDetails struct { Amount string `json:"amount"` Currency string `json:"currency"` TransactionReference string `json:"transactionReference"` TransactionStatus string `json:"transactionStatus"` CreationDate string `json:"creationDate"` RequestDate string `json:"requestDate"` DebitParty []KeyValue `json:"debitParty"` CreditParty []KeyValue `json:"creditParty"` Metadata []KeyValue `json:"metadata"` Fees []Fee `json:"fees"` }
type TransactionRequest ¶
type TransactionRequest struct { Amount string `json:"amount"` Currency string `json:"currency"` DescriptionText string `json:"descriptionText"` RequestDate string `json:"requestDate"` DebitParty []KeyValue `json:"debitParty"` CreditParty []KeyValue `json:"creditParty"` Metadata []KeyValue `json:"metadata"` RequestingOrganisationTransactionReference string `json:"requestingOrganisationTransactionReference"` OriginalTransactionReference string `json:"originalTransactionReference"` }
type TransactionResponse ¶
type TransactionService ¶
type TransactionService service
func (*TransactionService) GetTransactionDetails ¶
func (s *TransactionService) GetTransactionDetails(transactionID string) (*TransactionDetails, error)
func (*TransactionService) GetTransactionStatus ¶
func (s *TransactionService) GetTransactionStatus(serverCorrelationID string) (*TransactionStatus, error)
func (*TransactionService) SendPayment ¶
func (s *TransactionService) SendPayment(tx *TransactionRequest) (*TransactionResponse, error)
Click to show internal directories.
Click to hide internal directories.