/spree_stripe_terminal

Stripe Terminal For Spree

Primary LanguageRubyBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

Spree Stripe Terminal

This gem allows you to process payments with the stripe terminal via the backend of spree. Make sure to register the reader with the stripe dashboard before you begin.

Installation

  1. Add this extension to your Gemfile with this line:
gem 'spree_stripe_terminal', github: 'ShopFelixGray/spree_stripe_terminal'
  1. Install the gem using Bundler:
bundle install
  1. Copy & run migrations
bundle exec rails g spree_stripe_terminal:install
  1. Add a stripe.rb file to your application config/initializers folder with the following information:

    require 'stripe'
    Stripe.api_key = YOUR_STRIPE_API_KEY
    Stripe.api_version = '2019-05-16'
  2. Restart your server

If your server was running, restart it so that it can find the assets properly.

  1. Add the Stripe Terminal payment method

    When adding the payment method, make sure to keep auto capture unchecked as the terminal always requires an auth + capture.

Testing

First bundle your dependencies, then run rake. rake will default to building the dummy app if it does not exist, then it will run specs. The dummy app can be regenerated by using rake test_app.

bundle
bundle exec rake

When testing your applications integration with this extension you may use it's factories. Simply add this require statement to your spec_helper:

require 'spree_stripe_terminal/factories'

Contributing

If you'd like to contribute, please take a look at the instructions for installing dependencies and crafting a good pull request.

Copyright (c) 2020 Houtan Fanisalek (Felix Gray, Inc.), released under the New BSD License