Skip to content
This repository has been archived by the owner on Mar 1, 2023. It is now read-only.

mrzen/go-sagepay

Repository files navigation

Sagepay Go

An API client library for Sagepay and Go.

Features

  • Overridable HTTP Client
  • Context support for tracibility
  • Minimal Dependencies
  • Pluggable credential sources

Examples

  1. Get a merchant session key
import "github.com/mrzen/go-sagepay"

func GetSessionKey(ctx context.Context) (*sagepay.SessionKey, error) {
    // Gets credentials from `SAGE_USERNAME` and `SAGE_PASSWORD` env
    sage := sagepay.New(ctx, sagepay.EnvironmentCredentialsProvider{})
    return sage.GetSessionKey(ctx, "myVendorName")
}

Releases

No releases published

Packages

No packages published

Languages