|
1 | 1 | # Spree Gateway |
2 | 2 |
|
3 | | -[](https://travis-ci.org/spree/spree_gateway) |
4 | | -[](https://codeclimate.com/github/spree/spree_gateway) |
| 3 | +[](https://travis-ci.org/spree/spree_gateway) |
| 4 | +[](https://codeclimate.com/github/spree/spree_gateway) |
5 | 5 |
|
6 | 6 | Community supported Spree Payment Method Gateways. It works as a wrapper for |
7 | 7 | active_merchant gateway. Note that for some gateways you might still need to |
8 | 8 | add another gem to your Gemfile to make it work. For example active_merchant |
9 | 9 | require `braintree` but it doesn't include that gem on its gemspec. So you |
10 | 10 | need to manually add it to your rails app Gemfile. |
11 | 11 |
|
12 | | -These can be used with Spree >= 1.0.x (but see note below for necessary changes) |
13 | | - |
14 | | -http://guides.spreecommerce.com/developer/payments.html |
15 | | - |
16 | 12 | ## Installation |
17 | 13 |
|
18 | | -In your Gemfile: |
| 14 | +1. Add this extension to your Gemfile with this line: |
| 15 | + |
| 16 | + #### Spree >= 3.1 |
19 | 17 |
|
20 | | -**Spree edge** |
| 18 | + ```ruby |
| 19 | + gem 'spree_gateway', github: 'spree/spree_gateway' |
| 20 | + ``` |
21 | 21 |
|
22 | | -```ruby |
23 | | -gem 'spree' |
24 | | -gem 'spree_gateway', github: 'spree/spree_gateway', branch: 'master' |
25 | | -``` |
| 22 | + #### Spree 3.0 and Spree 2.x |
26 | 23 |
|
27 | | -**Spree 1.3** |
| 24 | + ```ruby |
| 25 | + gem 'spree_gateway', github: 'spree/spree_gateway', branch: 'X-X-stable' |
| 26 | + ``` |
28 | 27 |
|
29 | | -```ruby |
30 | | -gem 'spree', '~> 1.3' |
31 | | -gem 'spree_gateway', github: 'spree/spree_gateway', branch: '1-3-stable' |
32 | | -``` |
| 28 | + The `branch` option is important: it must match the version of Spree you're using. |
| 29 | + For example, use `3-0-stable` if you're using Spree `3-0-stable` or any `3.0.x` version. |
33 | 30 |
|
34 | | -Then run from the command line: |
| 31 | +2. Install the gem using Bundler: |
| 32 | + ```ruby |
| 33 | + bundle install |
| 34 | + ``` |
35 | 35 |
|
36 | | - $ bundle install |
37 | | - $ rails g spree_gateway:install |
| 36 | +3. Copy & run migrations |
| 37 | + ```ruby |
| 38 | + bundle exec rails g spree_gateway:install |
| 39 | + ``` |
38 | 40 |
|
39 | 41 | Finally, make sure to **restart your app**. Navigate to *Configuration > Payment Methods > New Payment Method* in the admin panel and you should see that a bunch of additional gateways have been added to the list. |
40 | 42 |
|
|
0 commit comments