Accept Bitcoin, Litecoin, Dogecoin, DigiBytes and more through the LitePaid service - a fast and easy way to accept digital currencies.
Before you use this Gem you must create a LitePaid account and setup a Website Profile to obtain your API key.
Add this line to your application's Gemfile:
gem 'litepaid'And then execute:
$ bundle
Or install it yourself as:
$ gem install litepaid
Require the LitePaid API Client:
require 'litepaid'Initialize the LitePaid API Client with your API key:
litepaid = Litepaid::Client.new("628fe07656a3ab97eaed93e799d4c64118913248814adbeb92f07abc3752de00")Create a Payment:
payment = litepaid.payments.create(
value: 10.0,
description: 'My Test Payment',
currency: 'usd',
return_url: 'https://shop.mysite.com/payment/result'
)Check payment status:
payment = litepaid.payments.get('2521c073c096921cebfe')Refund a payment:
refund = litepaid.refunds.create(
id: '2521c073c096921cebfe'
address: 'DLvbw3sEcjBs8e6YGnb123456789012345'
)After checking out the repo, run bin/setup to install dependencies. Then, 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 to create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.
- Fork it ( https://github.com/tofugear/litepaid-ruby/fork )
- 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 a new Pull Request