https://github.com/bitpay/bitpay-test-helper
Command line tool to set up environment variables for testing BitPay integrations
https://github.com/bitpay/bitpay-test-helper
Last synced: about 1 year ago
JSON representation
Command line tool to set up environment variables for testing BitPay integrations
- Host: GitHub
- URL: https://github.com/bitpay/bitpay-test-helper
- Owner: bitpay
- License: mit
- Created: 2015-09-22T21:47:07.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-09-22T22:13:38.000Z (over 10 years ago)
- Last Synced: 2025-04-06T08:03:03.236Z (about 1 year ago)
- Language: Elixir
- Size: 125 KB
- Stars: 5
- Watchers: 8
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
BitPay Test Helper
=========
Running automated tests with BitPay libraries usually requires setting some environment variables and associating them with your test account. The BitPay Test Helper is a simple command line utility that will set the command line variables for some of the libraries, including the Go, Ruby, and Elixir libraries.
The Test Helper is written in Elixir, version 1.0.5, so you will need to install Erlang 17.5 or Elixir in order to run the binary. Most package managers will have Erlang or Elixir. It isn't strictly neccessary to have Elixir as well as Erlang, but install instructions for Elixir are a bit clearer and can be found on the [Elixir web site](http://elixir-lang.org/install.html).
Once you have Erlang/Elixir installed, just place the binary bpth somewhere in your PATH. There are two commands `bpth new ` and `bpth pair`. The first command creates a new file in the folder where it is run called `.bpenv`. An example shell session is shown below.
```shell
$ bpth new https://test.bitpay.com
Please run 'source .bpenv' to set variables
$ source .bpenv
$ bpth pair
HqeBHez
$
```
The output string from `bpth pair` is a pairing code for a merchant token. You can approve the token by logging into your dashboard and looking under "Payment Tools" and then "Manage API tokens".