Documentation
¶
Overview ¶
Package Mangopay provides services to communicate with the official API.
A basic usage would be to create a Basic Auth connexion.
api := mangopay.NewWithBasicAuth(cliendID, clientPassword) cli, _ := api.Client.View() log.Print(cli) // this will display your current Client information.
Index ¶
Examples ¶
Constants ¶
View Source
const ( // APIVersion is the current API version in the URI calls. APIVersion = "v2.01" // ModeTest is for using the API sandbox. ModeTest = "test" // ModeProduction is for the API production. ModeProduction = "production" )
Variables ¶
View Source
var ( // Mode is the mode of the SDK calls by defaults this is set to test mode. Mode = ModeTest // Logger is the default internal logging tool that is used. // This can be replaced by another logging tool of your choice like Zap or Logrus. Logger log.Logger = log.DefaultLogger )
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct { // List of all avalable services. Clients *service.Clients ClientWallets *service.ClientWallets Users *service.Users UserEmoney *service.UserEmoneys Wallets *service.Wallets Cards *service.Cards PayIns *service.PayIns Transferts *service.Transferts BankAccounts *service.BankAccounts PayOuts *service.PayOuts KYCs *service.KYCs Stats *service.Stats UBOs *service.UBOs Mandates *service.Mandates Hooks *service.Hooks Events *service.Events Transactions *service.Transactions PreAuthorizations *service.PreAuthorizations Refunds *service.Refunds Disputes *service.Disputes DisputeDocuments *service.DisputeDocunents Repudiations *service.Repudiations SettlementTransfers *service.SettlementTranfers BankingAliases *service.BankingAliases SSOS *service.SSOS PermissionGroups *service.PermissionGoups Reports *service.Reports Idempotencies *service.Idempotencies // contains filtered or unexported fields }
API holds all the services for calling Mongopay API.
func NewWithBasicAuth ¶
NewWithBasicAuth sends a new Mangonpay client with Basic Auth.
Example ¶
api := mangopay.NewWithBasicAuth("client-id", "client-password") api.Users.View("1234")
Output:
func NewWithOAuth ¶
NewWithOAuth is used for an oauth token connexion.
Click to show internal directories.
Click to hide internal directories.