EthereumPOS is a Point of Sale system for merchants and developers who want to accept Ethereum on their website or application. Using Ethereum blockchain you'll be able to confirm transactions quicker than with the bloat of the Bitcoin blockchain. EthereumPOS allows online shopping carts and applications to receive a callback to confirm the customer paid in full.
Add this line to your application's Gemfile:
gem 'ethereumpos-gem'
And then execute:
$ bundle
Or install it yourself as:
$ gem install ethereumpos-gem
Ethereumpos::Configuration.configure do |config|
config.api_key = "TESTMODEAPIkey"
config.api_secret = "TESTMODEAPIkey"
config.test_mode = true
end
order = {
amount: "33.50",
address: "0x9eif0939di3dii32diojwedfjhijhiodjoiwejo",
callback: ""
}
response = Ethereumpos::Order.create(order)
puts "New Order ID: #{@response['id']}"
puts "Pay To Address: #{@response['address']} \n"
puts "Order Expected Amount: #{@response['expected_amount']} ETH \n"
response = Ethereumpos::Order.get("716101452")
puts "Order Status: #{response['status']} \n"
puts "Pay To Address: #{@response['address']} \n"
puts "Order Expected Amount: #{response['expected_amount']} ETH \n"
The gem is available as open source under the terms of the MIT License.