supercharged 2.1.0 → 2.2.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5e8d7ac5853344d5679abd3e17acf7dc1b6279b6
4
- data.tar.gz: 6960d5ece3a7b407c7b13ca86dd57715452b7bea
3
+ metadata.gz: 91ca2d4d007d2be7b16810b57f99a38693a338d3
4
+ data.tar.gz: de7d6235df9fce266f4c9c014e7c27088a3331af
5
5
  SHA512:
6
- metadata.gz: 602af557001d93eb89e6e76412b6e1a1beea04be1a75f98850710471a3ec073e15805fbbf1587bfedde64532b1d87d0877fa1fb23a19c6fb11456b6eef571c80
7
- data.tar.gz: ac0b75823e466d61dd7c05c399b6e3cb008f739491a2059443a0f6dd9f7265140fdcf315f686c9a4d1fe85d4a4e002a33ddbbe40152c752a3e7e8e2fd8ca060d
6
+ metadata.gz: ba064f29b13913a889f6c74778071cc5cca192c70797b5c1a563b555ee4f2568ffe2f9059e205ec13ccd22372ba7ababdcd7a58e10828618d8697781c9355024
7
+ data.tar.gz: 4bfd5e4b2860abd3a71547b06c4523b5fab7942aab2126d077bba8907a0d7a28812d94e43b394904d12c91fd45dc7bd6b994c40a0c0090673e7b6a9f10f7de35
@@ -17,6 +17,8 @@ class @SuperchargedForm
17
17
  alert("Error: undefined charge id")
18
18
  return false
19
19
 
20
+ $("@charge-submit-button").prop("disabled", false)
21
+
20
22
  startPayment: ->
21
23
  valid = true
22
24
  @createInternalTransaction(
@@ -47,7 +47,7 @@ class GatewayNotification < ActiveRecord::Base
47
47
  private
48
48
 
49
49
  def adapter
50
- @adapter ||= "ActiveMerchant::Billing::Integrations::#{gateway.classify}::Notification".classify.constantize.new(raw_post)
50
+ @adapter ||= "ActiveMerchant::Billing::Integrations::#{gateway.classify}::Notification".classify.constantize.new(raw_post, Supercharged::Helpers.integrations_options(gateway))
51
51
  rescue NameError
52
52
  raise "Unknown integration '#{gateway}'"
53
53
  end
@@ -1,6 +1,7 @@
1
1
  module Supercharged
2
2
  module Helpers
3
3
  @gateways = {}
4
+ @integrations_options = {}
4
5
 
5
6
  def self.gateway(name)
6
7
  @gateways[name.to_sym] || raise("Gateway not registered")
@@ -12,9 +13,17 @@ module Supercharged
12
13
  add_gateway(name, gateway)
13
14
  end
14
15
 
16
+ def self.init_integration(name, options)
17
+ @integrations_options[name.to_sym] = options
18
+ end
19
+
20
+ def self.integrations_options(name)
21
+ @integrations_options[name.to_sym]
22
+ end
23
+
15
24
  private
16
25
 
17
- def self.gateway_class_by_name(name)
26
+ def self.gateway_class_by_name(name)
18
27
  "ActiveMerchant::Billing::#{name.to_s.camelcase}Gateway".classify.constantize
19
28
  rescue NameError
20
29
  raise "Unknown gateway '#{name}'"
@@ -1,3 +1,3 @@
1
1
  module Supercharged
2
- VERSION = "2.1.0"
2
+ VERSION = "2.2.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: supercharged
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - divineforest
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-10 00:00:00.000000000 Z
11
+ date: 2014-04-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -176,7 +176,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
176
176
  version: '0'
177
177
  requirements: []
178
178
  rubyforge_project:
179
- rubygems_version: 2.2.0
179
+ rubygems_version: 2.2.2
180
180
  signing_key:
181
181
  specification_version: 4
182
182
  summary: MVC solution for charges in rails