AMplifyPay Payments Ruby Client Library
http://amplifypay.com/developers
Add this line to your application's Gemfile:
gem 'amplifypay_ruby'And then execute:
$ bundle
Or install it yourself as:
$ gem install amplifypay_ruby
If you are using rails you may create an file under RAILS_ROOT/config/initializers and put these setting there.
AmplifypayRuby::Setup.merchant_id = "YOUR_MERCHANT_ID"
AmplifypayRuby::Setup.private_key = "YOUR_API_PRIVATE_KEY"
AmplifypayRuby::Setup.redirect_url = "http://example.com/order"
co = AmplifypayRuby::Checkout::Invoice.new
co.total_amount = 1200.99
co.customer = {"email" => "john.doe@mail.com", "name" => "John Doe"}
co.trans_id = 23437888888
if co.create
redirect_to co.invoice_url
else
@message = co.response_text
end
if co.confirm(transactionRef)
//your logic e.g
@message = co.response_text
end
- 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
This gem draws ideas from:
https://github.com/MPowerPayments/mpower_ruby
The gem is available as open source under the terms of the MIT License.