SPIKE API Client for Ruby.
Installation
Add this line to your application's Gemfile:
And then execute:
Or install it yourself as:
Usage
Example: Create charge
require 'spike' spike = Spike.new(spike_secret_api_key) token_params = { 'card[number]' => '4444333322221111', 'card[exp_month]' => '3', 'card[exp_year]' => '2017', 'card[cvc]' => '111', 'card[name]' => 'TARO SPIKE', 'currency' => 'JPY', 'email' => 'foo@example.com' } token = spike.token.create(token_params) request_params = { mount: 1000, currency: "JPY", card: token.id } products = [{ title: "item title", description: "item description", price: 1000, stock: 10, language: "JA", count: 1, currency: "JPY", id: "00001" }] spike.charge.create(request_params, products)
Contributing
- Fork it ( https://github.com/spice-life/spike-ruby/fork )
- Create your feature branch (
git checkout -b my-new-feature) - Pass tests (
bundle exec rspec) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request