Logo Lanfrica

Golang-Tanzania/azampay

Domain:

digital infrastructure

Record type:

software
Creator:
Gol
Host:
A Golang Client for Azam Payment Gateway AZAMPAY A golang client to access the Azam Payment Gateway. Made with love for gophers ❤️. ## Introduction AzamPay is specialized in the development of end-to-end online payment management solutions for companies operating in East Africa. They provide an API which allows developers to integrate their system's to Azampay's gateway. This is a Golang client which significantly simplifies access and integration to Azampay's gateway. ## Features of azampay - Make mobile network checkouts - Make bank checkouts - Manage callback URLs after a transaction is confirmed - Return a list of registered partners of the provided merchant - Create post checkout URLs for payments - Transfer of money from other countries to Tanzania - Lookup the name associated with a bank account or Mobile Money account - Retrieve the status of a disbursement transaction made through AzamPay ## Pre-Requisites - Sign up for a developer account with Azampay - Register an app to get credentials - Use the provided credentials to access the API. ## Installation *Note: Ensure you have initialized your go code with `go mod init`* Install the package with the `go get` command as shown below: ```sh go get github.com ``` Then import it as follows: ```go package main import ( "github.com" ) ``` ## Authentication ### Token Generation ```go appName := "Your app name from azamm pay" clientId := "Client id from azam pay" clientSecret := "Client secret from azam pay" tokenKey := "Your token from azam pay" client, err := azampay.NewClient(appName, clientId, clientSecret, tokenKey) if err != nil { panic(err) } ctx := context.Background() _, err = client.GetAccessToken(ctx) if err != nil { fmt.Println(err) } ``` ## Transactions ### MNO Checkout ```go // example MNO checkout exampleMNOCheckout := azampay.MnoPayload{ AccountNumber: "0654001122", Amount: "2000", Currency: "TZS", ExternalID: "123", Provider: "Tigo" …