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
- Run
bundle install
- Copy
config/config.example.yml
toconfig/config.yml
- Edit
config/config.yml
to 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 opening a support ticket at Chargify) - Create products on your API User's Site with handles 'member' (or edit the example to match product handles you have)
- Invoke the app with
rackup
and play at http://localhost:9292