supercharged 2.1.0 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 91ca2d4d007d2be7b16810b57f99a38693a338d3
|
4
|
+
data.tar.gz: de7d6235df9fce266f4c9c014e7c27088a3331af
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ba064f29b13913a889f6c74778071cc5cca192c70797b5c1a563b555ee4f2568ffe2f9059e205ec13ccd22372ba7ababdcd7a58e10828618d8697781c9355024
|
7
|
+
data.tar.gz: 4bfd5e4b2860abd3a71547b06c4523b5fab7942aab2126d077bba8907a0d7a28812d94e43b394904d12c91fd45dc7bd6b994c40a0c0090673e7b6a9f10f7de35
|
@@ -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
|
data/lib/supercharged/helpers.rb
CHANGED
@@ -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
|
-
|
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}'"
|
data/lib/supercharged/version.rb
CHANGED
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.
|
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-
|
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.
|
179
|
+
rubygems_version: 2.2.2
|
180
180
|
signing_key:
|
181
181
|
specification_version: 4
|
182
182
|
summary: MVC solution for charges in rails
|