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.
- Add this extension to your Gemfile with this line:
gem 'spree_stripe_terminal', github: 'ShopFelixGray/spree_stripe_terminal'
- Install the gem using Bundler:
bundle install
- Copy & run migrations
bundle exec rails g spree_stripe_terminal:install
-
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'
-
Restart your server
If your server was running, restart it so that it can find the assets properly.
-
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.
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'
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