spree_core 0.40.0 → 0.40.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -5,6 +5,7 @@ class CheckoutController < Spree::BaseController
5
5
  ssl_required
6
6
 
7
7
  before_filter :load_order
8
+ rescue_from Spree::GatewayError, :with => :rescue_from_spree_gateway_error
8
9
 
9
10
  # Updates the order and advances to the next state (when possible.)
10
11
  def update
@@ -84,4 +85,9 @@ class CheckoutController < Spree::BaseController
84
85
  Country.find Spree::Config[:default_country_id]
85
86
  end
86
87
 
88
+ def rescue_from_spree_gateway_error
89
+ flash[:error] = t('spree_gateway_error_flash_for_checkout')
90
+ render :edit
91
+ end
92
+
87
93
  end
@@ -876,6 +876,7 @@ en:
876
876
  spree:
877
877
  date: Date
878
878
  time: Time
879
+ spree_gateway_error_flash_for_checkout: "There was a problem with your payment information. Please check your information and try again."
879
880
  ssl_will_be_used_in_development_and_test_modes: "SSL will be used in development and test mode if necessary."
880
881
  ssl_will_be_used_in_production_mode: "SSL will be used in production mode"
881
882
  ssl_will_not_be_used_in_development_and_test_modes: "SSL will not be used in development and test mode if necessary."
@@ -6,6 +6,11 @@ module Spree
6
6
  def before_save_new_order
7
7
  end
8
8
 
9
+ # This should be overridden by an auth-related extension which would then have the opporutnity to store tokens, etc. in the session
10
+ # after saving.
11
+ def after_save_new_order
12
+ end
13
+
9
14
  # The current incomplete order from the session for use in cart and during checkout
10
15
  def current_order(create_order_if_necessary = false)
11
16
  return @current_order if @current_order
@@ -14,6 +19,7 @@ module Spree
14
19
  @current_order = Order.new
15
20
  before_save_new_order
16
21
  @current_order.save!
22
+ after_save_new_order
17
23
  end
18
24
  session[:order_id] = @current_order ? @current_order.id : nil
19
25
  @current_order
data/lib/spree_core.rb CHANGED
@@ -67,7 +67,7 @@ end
67
67
 
68
68
  module Spree
69
69
  def self.version
70
- "0.40.0"
70
+ "0.40.1"
71
71
  end
72
72
  end
73
73
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_core
3
3
  version: !ruby/object:Gem::Version
4
- hash: 191
4
+ hash: 189
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 40
9
- - 0
10
- version: 0.40.0
9
+ - 1
10
+ version: 0.40.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Sean Schofield
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-12-22 00:00:00 -05:00
18
+ date: 2011-01-14 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -24,7 +24,7 @@ dependencies:
24
24
  requirement: &id001 !ruby/object:Gem::Requirement
25
25
  none: false
26
26
  requirements:
27
- - - ">="
27
+ - - "="
28
28
  - !ruby/object:Gem::Version
29
29
  hash: 31
30
30
  segments:
@@ -40,7 +40,7 @@ dependencies:
40
40
  requirement: &id002 !ruby/object:Gem::Requirement
41
41
  none: false
42
42
  requirements:
43
- - - ">="
43
+ - - "="
44
44
  - !ruby/object:Gem::Version
45
45
  hash: 15
46
46
  segments:
@@ -56,7 +56,7 @@ dependencies:
56
56
  requirement: &id003 !ruby/object:Gem::Requirement
57
57
  none: false
58
58
  requirements:
59
- - - ">="
59
+ - - "="
60
60
  - !ruby/object:Gem::Version
61
61
  hash: 27
62
62
  segments:
@@ -72,7 +72,7 @@ dependencies:
72
72
  requirement: &id004 !ruby/object:Gem::Requirement
73
73
  none: false
74
74
  requirements:
75
- - - ">="
75
+ - - "="
76
76
  - !ruby/object:Gem::Version
77
77
  hash: 1
78
78
  segments:
@@ -88,7 +88,7 @@ dependencies:
88
88
  requirement: &id005 !ruby/object:Gem::Requirement
89
89
  none: false
90
90
  requirements:
91
- - - ">="
91
+ - - "="
92
92
  - !ruby/object:Gem::Version
93
93
  hash: 17
94
94
  segments:
@@ -104,7 +104,7 @@ dependencies:
104
104
  requirement: &id006 !ruby/object:Gem::Requirement
105
105
  none: false
106
106
  requirements:
107
- - - ">="
107
+ - - "="
108
108
  - !ruby/object:Gem::Version
109
109
  hash: 51
110
110
  segments:
@@ -120,14 +120,14 @@ dependencies:
120
120
  requirement: &id007 !ruby/object:Gem::Requirement
121
121
  none: false
122
122
  requirements:
123
- - - ">="
123
+ - - "="
124
124
  - !ruby/object:Gem::Version
125
- hash: 17
125
+ hash: 51
126
126
  segments:
127
127
  - 0
128
- - 3
129
- - 1
130
- version: 0.3.1
128
+ - 9
129
+ - 4
130
+ version: 0.9.4
131
131
  type: :runtime
132
132
  version_requirements: *id007
133
133
  - !ruby/object:Gem::Dependency
@@ -136,15 +136,14 @@ dependencies:
136
136
  requirement: &id008 !ruby/object:Gem::Requirement
137
137
  none: false
138
138
  requirements:
139
- - - ">="
139
+ - - "="
140
140
  - !ruby/object:Gem::Version
141
- hash: 113
141
+ hash: 19
142
142
  segments:
143
143
  - 2
144
144
  - 3
145
- - 1
146
- - 1
147
- version: 2.3.1.1
145
+ - 8
146
+ version: 2.3.8
148
147
  type: :runtime
149
148
  version_requirements: *id008
150
149
  - !ruby/object:Gem::Dependency
@@ -167,7 +166,7 @@ dependencies:
167
166
  requirement: &id010 !ruby/object:Gem::Requirement
168
167
  none: false
169
168
  requirements:
170
- - - ">="
169
+ - - "="
171
170
  - !ruby/object:Gem::Version
172
171
  hash: 7
173
172
  segments:
@@ -177,29 +176,13 @@ dependencies:
177
176
  version: 3.0.0
178
177
  type: :runtime
179
178
  version_requirements: *id010
180
- - !ruby/object:Gem::Dependency
181
- name: activemerchant
182
- prerelease: false
183
- requirement: &id011 !ruby/object:Gem::Requirement
184
- none: false
185
- requirements:
186
- - - ">="
187
- - !ruby/object:Gem::Version
188
- hash: 9
189
- segments:
190
- - 1
191
- - 7
192
- - 1
193
- version: 1.7.1
194
- type: :runtime
195
- version_requirements: *id011
196
179
  - !ruby/object:Gem::Dependency
197
180
  name: will_paginate
198
181
  prerelease: false
199
- requirement: &id012 !ruby/object:Gem::Requirement
182
+ requirement: &id011 !ruby/object:Gem::Requirement
200
183
  none: false
201
184
  requirements:
202
- - - ">="
185
+ - - "="
203
186
  - !ruby/object:Gem::Version
204
187
  hash: -1876988247
205
188
  segments:
@@ -208,14 +191,14 @@ dependencies:
208
191
  - pre2
209
192
  version: 3.0.pre2
210
193
  type: :runtime
211
- version_requirements: *id012
194
+ version_requirements: *id011
212
195
  - !ruby/object:Gem::Dependency
213
196
  name: rails
214
197
  prerelease: false
215
- requirement: &id013 !ruby/object:Gem::Requirement
198
+ requirement: &id012 !ruby/object:Gem::Requirement
216
199
  none: false
217
200
  requirements:
218
- - - ">="
201
+ - - "="
219
202
  - !ruby/object:Gem::Version
220
203
  hash: 1
221
204
  segments:
@@ -224,14 +207,14 @@ dependencies:
224
207
  - 3
225
208
  version: 3.0.3
226
209
  type: :runtime
227
- version_requirements: *id013
210
+ version_requirements: *id012
228
211
  - !ruby/object:Gem::Dependency
229
212
  name: jquery-rails
230
213
  prerelease: false
231
- requirement: &id014 !ruby/object:Gem::Requirement
214
+ requirement: &id013 !ruby/object:Gem::Requirement
232
215
  none: false
233
216
  requirements:
234
- - - ">="
217
+ - - "="
235
218
  - !ruby/object:Gem::Version
236
219
  hash: 19
237
220
  segments:
@@ -240,7 +223,7 @@ dependencies:
240
223
  - 2
241
224
  version: 0.2.2
242
225
  type: :runtime
243
- version_requirements: *id014
226
+ version_requirements: *id013
244
227
  description: Required dependancy for Spree
245
228
  email: sean@railsdog.com
246
229
  executables: []