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 - 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
rackup
and play at http://localhost:9292