Scanpay Go client library
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
tests
LICENSE
README.md
api.go
internal.go

README.md

Scanpay Go client

This is a Go client library for Scanpay. You can find the documentation at docs.scanpay.dk.

Installation

go get github.com/scanpaydk/go-scanpay

To create a payment link all you need to do is:

package main
import(
    "github.com/scanpaydk/go-scanpay"
    "fmt"
)

func main() {
    client := scanpay.NewClient(" API KEY ")
    data := scanpay.PaymentURLData {
        Items: []scanpay.Item {
            {
                Name:    "Pink Floyd: The Dark Side Of The Moon",
                Quantity: 2,
                Total:   "199.98 DKK",
                SKU:     "fadf23",
            },
        },
    }
    url, err := client.NewURL(&data, nil)
    if err != nil {
        fmt.Println("Error:", err)
        return
    }
    fmt.Println(url)
}