Recurly.js Backend Example

by recurly

GitHub Readme.md

Recurly.js examples

This repository contains a set of example implementations of recurly.js using html, css, and JavaScript, and a set of API usage examples to demonstrate a few common use-cases for collecting and using recurly.js tokens.

Please note that these examples are not meant to be set onto a web server and forgotten. They are intended to act as a suggestion, wherein your custom needs may fill in any implementaiton gaps.

Deploy to Heroku

This repository can be deployed immediately to Heroku using the included Ruby Heroku API backend. If you choose to do this, feel free to delete the other language backends from your clone.

Deploy

Payment form examples

API token usage examples

Running locally

These examples are meant to be run locally, allowing you to easily experiment with modifications and get running quickly.

Simply clone this repository, read through the simple application code to familiarize yourself, and follow the startup instructions in one of the API token usage examples above.

You'll want to adjust the code to fit your specific redirection and error handling needs, but the example applications are designed to perform essential API functions on first boot.

Configuring the examples

Each API example will pull configuration values from environment variables. You may set them to quickly configure the example to connect to your Recurly site.

Environment variable description RECURLY_SUBDOMAIN The subdomain of your recurly site RECURLY_API_KEY Your private API key RECURLY_PUBLIC_KEY Your public API key SUCCESS_URL A URL to redirect to when an action suceeds ERROR_URL A URL to redirect to when an error occurs

Contributing

See CONTRIBUTING file.

License

MIT