supercharged 2.0.1 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -19,10 +19,14 @@ class Supercharged::GatewayNotificationsController < ApplicationController
19
19
 
20
20
  if error
21
21
  persistent_logger.error("Error: #{error.inspect}")
22
- if @notification.charge
22
+
23
+ charge = @notification.charge
24
+
25
+ if charge && !charge.error?
23
26
  @notification.charge.failed!
24
27
  @notification.charge.update_attribute(:error, error)
25
28
  end
29
+
26
30
  head :bad_request
27
31
  else
28
32
  persistent_logger.info("Success")
@@ -1,3 +1,3 @@
1
1
  module Supercharged
2
- VERSION = "2.0.1"
2
+ VERSION = "2.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: supercharged
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-06-27 00:00:00.000000000 Z
12
+ date: 2013-07-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -218,7 +218,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
218
218
  version: '0'
219
219
  segments:
220
220
  - 0
221
- hash: 2745199243149851943
221
+ hash: 1454715921606304247
222
222
  required_rubygems_version: !ruby/object:Gem::Requirement
223
223
  none: false
224
224
  requirements:
@@ -227,7 +227,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
227
227
  version: '0'
228
228
  segments:
229
229
  - 0
230
- hash: 2745199243149851943
230
+ hash: 1454715921606304247
231
231
  requirements: []
232
232
  rubyforge_project:
233
233
  rubygems_version: 1.8.23