Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/inuoshios/paystack-go-sdk

💸 An unofficial Golang SDK for Paystack.
https://github.com/inuoshios/paystack-go-sdk

fintech go golang paystack-api paystack-sdk

Last synced: about 1 month ago
JSON representation

💸 An unofficial Golang SDK for Paystack.

Awesome Lists containing this project

README

        

# Paystack Golang SDK

🐈 An unofficial Golang SDK for [Paystack](http://paystack.com).

## Installation

To install this package, use the command below

```sh
go get github.com/rxxcc/paystack-go-sdk
```

## Usage/Examples

### Import the package

```go
import "github.com/rxxcc/paystack-go-sdk"
```

_Get your keys from your Paystack dashboard and add it into your environment variables_

`To initialize a new client`

```go
package main

import (
paystack "github.com/rxxcc/paystack-go-sdk"
)

var (
sKeys = "{Your secret key}"
)

func main() {
// Handle error
newClient, _ := paystack.NewClient(sKeys)
}
```

`To create a new transaction`

```go
// --------------------------------- //
func main() {
testCase := &paystack.TransactionBody{
Amount: "300",
Email: "[email protected]",
}
transactionData, err := newClient.InitializeTransaction(transactionData)
}
```

## License

MIT

## Author

Inu John O.