This is a work in progress that seeks to explore the Payulatam's recurring payments api.
Add this line to your application's Gemfile:
gem 'recurrente'
And then execute:
$ bundle
Or install it yourself as:
$ gem install recurrente
This is divided into 5 sections in the same way that is explained in Payu's website.
- Plans
- Suscriptors
- Credit Cards
- Suscriptions
- Extra charges
Before anything you'll need to change the test data within an initializer in the config folder in order to replace these constants:
# TEST DATA
API_URL = "http://stg.api.payulatam.com/payments-api/rest/v4.3"
API_KEY = "6u39nqhq8ftd0hlvnjfs66eh8c"
API_LOGIN = "11959c415b33d0c"
MERCHANT_ID = "500238"
ACCOUNT = "500538"
Notice that the API_URL is pointing to http instead of using a secure protocol. This is just for testing purposes.
Everything is contained in the same ruby file because I wanted to see every method in one place. Clearly this needs improvement but so far this is what I got.
After checking out the repo, run bin/setup
to install dependencies. You can also run bin/console
for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install
. To release a new version, update the version number in version.rb
, and then run bundle exec rake release
, which will create a git tag for the version, push git commits and tags, and push the .gem
file to rubygems.org.
Bug reports and pull requests are welcome on GitHub at https://github.com/gabosarmiento/recurrente.
The gem is available as open source under the terms of the MIT License.