https://github.com/mitcheljager/brainblocks-rails
Simplifies use of Brainblocks (Nano payments) in Rails
https://github.com/mitcheljager/brainblocks-rails
Last synced: 3 months ago
JSON representation
Simplifies use of Brainblocks (Nano payments) in Rails
- Host: GitHub
- URL: https://github.com/mitcheljager/brainblocks-rails
- Owner: Mitcheljager
- License: mit
- Created: 2018-01-21T01:36:21.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-03-06T23:23:59.000Z (over 7 years ago)
- Last Synced: 2025-03-03T04:16:06.791Z (3 months ago)
- Language: Ruby
- Homepage:
- Size: 71.3 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# brainblocks-rails
Simplifies use of Brainblocks in Rails.
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'brainblocks-rails'
```And then execute:
$ bundle
Or install it yourself as:
$ gem install brainblocks-rails
Include it in your application.js as:
```
//= require brainblocks
```## Usage
```
brainblocks(wallet, amount, currency, on_success)
````on_success` Takes javascript. In the future I hope to support Rails actions.
`amount` Is in Rai; 1000 Rai = 0.001 XRB (or 1 Mxrb)
Example:
```
brainblocks("xrb_1rube3u6iyshxpe5g737zkqnmk7jq4whoi76dw1zip5wcy4y4rm84jw3bs79", 1000, "rai", "console.log('Payment successful!', data.token);")
```https://brainblocks.io/