Simple Wrapper for interact with Credomatic Paycon
Add this line to your application's Gemfile:
gem 'simple_credomatic_paycon'
And then execute:
$ bundle
Or install it yourself as:
$ gem install simple_credomatic_paycon
Create an object with the transaction information (including credomatic keys)
product_transaction = SimpleCredomaticPaycon::Transaction.new(
orderid: 'test-01',
amount: '2.00',
ccnumber: '1234567898765432',
ccexp: '1216',
cvv: '123',
username: 'credomatic-username',
key: 'credomatic-key',
key_id: 'credomatic-key_id'
)
Process the transaction (will do the request to Credomatic servers)
response = product_transaction.process
SimpleCredomaticPaycon.configure do |config|
config.show_trace = true
end
If you're using Rails, create an initializer for this:
config/initializers/simplecredomaticresponse.rb
The amount will be rounded to 2 decimals. Ex: 2.256 will be 2.26
TODO: Add Test suites using Webmock and VCR
This project uses Semantic Versioning for release numbering. For changelog notes, checkout CHANGELOG.md.
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request