bitpay / bitpay-go

Powerful, flexible, lightweight interface to the BitPay Bitcoin Payment Gateway API.
MIT License
34 stars 27 forks source link

BitPay Library for Go

MIT License Travis Build

Powerful, flexible, lightweight interface to the BitPay Bitcoin Payment Gateway API.

Getting Started »

Code documentation is available on godoc.

API Documentation

API Documentation is available on the BitPay site.

Running the Tests

In order to run the tests, follow these steps:

  1. Set the $GOPATH and $PATH variables

  2. Install the dependencies

    $ go get github.com/btcsuite/btcutil
    $ go get github.com/gorilla/mux
    $ go get github.com/onsi/ginkgo
    $ go get golang.org/x/crypto
  3. Clone the repository

    git clone https://github.com/bitpay/bitpay-go.git

    Into src/github.com/bitpay/bitpay-go/

  4. Set the environment variables BITPAYAPI & BITPAYPEM to "https://test.bitpay.com" and a valid PEM value.

    This is slightly tricky, the PEM file has to already be paired with a merchant token on your bitpay account. To do this it is probably best to use the bitpay test helper.

  5. You will also need a paid invoice on the server. Set the environment variable INVOICEID to the id of a paid invoice on the server.

  6. We are now ready to run the tests.

    ginkgo -r src/github.com/bitpay/

Found a bug?

Let us know! Send a pull request or a patch. Questions? Ask! We're here to help. We will respond to all filed issues.

BitPay Support:

Sometimes a download can become corrupted for various reasons. However, you can verify that the release package you downloaded is correct by checking the md5 checksum "fingerprint" of your download against the md5 checksum value shown on the Releases page. Even the smallest change in the downloaded release package will cause a different value to be shown!