This is a small Sinatra app that demonstrates how to use Chargify Direct for Signups. It leverages the new Chargify2 gem to create the Direct secure form inputs and signature, verify the redirect response, and fetch the call response.
- Clone this repo to your local machine
- Install the
config/config.ymlto add your own API User credentials (Note: this is a "V2" API User that is not generally available yet. You may request one to be created by contacting Michael Klett)
- Create products on your API User's Site with handles 'basic' and 'pro' (or edit the example to match product handles you have)
- Invoke the app with
ruby -rubygems chargify_direct_example_app.rband play at http://localhost:4567