Integrated example application using Authipay's Connect API.
In order to run this application you will need the following:
Firstly pull down the repo.
$ git clone https://github.com/testingpays/authipay_rails.git
Next enter the directory and install the applications dependencies using bundler
$ gem install bundler
$ bundle install
You also need to have an Authipay account setup. And from that you need to set the following credentials into environment variables:
AUTHIPAY_STORE_ID=1234567890
AUTHIPAY_USER_ID=1234567890
AUTHIPAY_SHARED_SECRET=t1p%0gBao
CALLBACK_BASE="http://localhost:3001"
Now that we have the application installed and our api keys setup we can start using the application. firstly lets run the tests to make everything is in order.
$ rails test
Your tests should have ran successfully. now to run the application use the following command.
$ rails server
Your application should now be running locally.
In order to work with Testing Pays you need to provide your API Key. You can find that in the instructions or in your team page.
When you point at Testing Pays, set the following environment variables:
AUTHIPAY_SHARED_SECRET=SharedSecret
AUTHIPAY_URL="https://api.testingpays.com/YOUR_KEY_HERE/authipay/v1/connect/checkout"
And you should be ready to go
Testing Pays makes testing many types of responses easy. In order to get a particular response simply pass in the associated response mapping. E.g.
amount: 0 # => success
For a full list of response mappings see the Test tab of your sim.