This gem implements some funcionalities of Cielo to Spree Commerce.
Installation
Add spree_zaez_cielo to your Gemfile:
gem 'spree_zaez_cielo', github: 'zaeznet/spree_zaez_cielo'
Bundle your dependencies and run the installation generator:
bundle
bundle exec rails g spree_zaez_cielo:install
Settings
To configure the Cielo settings, go to /admin/cielo_settings/edit (or access by the menu in configurations > Cielo Settings). To set the settings through a config file, you can assign values to the settings like so:
Spree::CieloConfig[:token] = 'asd-123'
See all settings in /lib/spree/cielo_configuration.rb.
Atention
For return url in debt card, it's used the setting SITE URL in general settings. So fill this field for complete success of debt cards.
Funcionalities
This gem supports credit and debt transactions. The credit card available are:
- Visa;
- Mastercard;
- Diners;
- Discover;
- Elo;
- American Express;
- JCB.
And the debt cards are:
- Visa;
- Mastercard.
The transaction by token can be set by setting (using the Spree::CieloConfig[:generate_token]
).
Testing
First bundle your dependencies, then run rake
. rake
will default to building the dummy app if it does not exist, then it will run specs. The dummy app can be regenerated by using rake test_app
.
bundle
bundle exec rake
When testing your applications integration with this extension you may use it's factories. Simply add this require statement to your spec_helper:
require 'spree_zaez_cielo/factories'
Copyright (c) 2015 Zaez Inovação Digital, released under the New BSD License