Skip to content

NdoleStudio/neero-go

Repository files navigation

neero-go

Build codecov Scrutinizer Code Quality Go Report Card GitHub contributors GitHub license PkgGoDev

This package provides a go API client for the Neero Payment Gateway API

Installation

neero-go is compatible with modern Go releases in module mode, with Go installed:

go get github.com/NdoleStudio/neero-go

Alternatively the same can be achieved if you use import in a package:

import "github.com/NdoleStudio/neero-go"

Implemented

  • Payment Methods
    • POST /api/v1/payment-methods: Create Payment Method
    • POST /api/v1/payment-methods/resolve-details: Resolve Payment Method Details
  • Balances
    • GET /api/v1/balances/payment-method/{paymentMethodId}: Get Balance for a Payment Method
  • Transaction Intents
    • POST /api/v1/transaction-intents/cash-in: Create Cash In Payment Intent
    • POST /api/v1/transaction-intents/cash-out: Create Cash Out Payment Intent
    • GET /api/v1/transaction-intents/{transactionId}: Find Transaction Intent By Id

Usage

Initializing the Client

An instance of the client can be created using New().

package main

import (
	"github.com/NdoleStudio/neero-go"
)

func main()  {
	client := neero.New(neero.WithSecretKey("" /*Your Neero merchant account secret key*/))
}

Error handling

All API calls return an error as the last return object. All successful calls will return a nil error.

status, response, err := statusClient.Status.Ok(context.Background())
if err != nil {
    //handle error
}

Testing

You can run the unit tests for this client from the root directory using the command below:

go test -v

License

This project is licensed under the MIT License - see the LICENSE file for details

About

Go library for the Neero Payment Gateway API

Topics

Resources

License

Stars

Watchers

Forks

Languages