yetanothernguyen-activemerchant 1.16.0 → 1.21.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +95 -0
- data/CONTRIBUTORS +29 -0
- data/lib/active_merchant/billing/credit_card.rb +105 -19
- data/lib/active_merchant/billing/credit_card_methods.rb +5 -1
- data/lib/active_merchant/billing/gateway.rb +1 -1
- data/lib/active_merchant/billing/gateways/authorize_net.rb +24 -2
- data/lib/active_merchant/billing/gateways/authorize_net_cim.rb +104 -18
- data/lib/active_merchant/billing/gateways/beanstream/beanstream_core.rb +110 -4
- data/lib/active_merchant/billing/gateways/beanstream.rb +29 -1
- data/lib/active_merchant/billing/gateways/braintree_blue.rb +9 -4
- data/lib/active_merchant/billing/gateways/braintree_orange.rb +4 -0
- data/lib/active_merchant/billing/gateways/card_save.rb +23 -0
- data/lib/active_merchant/billing/gateways/certo_direct.rb +279 -0
- data/lib/active_merchant/billing/gateways/efsnet.rb +9 -9
- data/lib/active_merchant/billing/gateways/elavon.rb +2 -1
- data/lib/active_merchant/billing/gateways/epay.rb +12 -6
- data/lib/active_merchant/billing/gateways/eway_managed.rb +46 -12
- data/lib/active_merchant/billing/gateways/exact.rb +5 -0
- data/lib/active_merchant/billing/gateways/ideal/ideal_base.rb +3 -3
- data/lib/active_merchant/billing/gateways/ipay88.rb +157 -0
- data/lib/active_merchant/billing/gateways/iridium.rb +3 -3
- data/lib/active_merchant/billing/gateways/itransact.rb +450 -0
- data/lib/active_merchant/billing/gateways/merchant_e_solutions.rb +1 -0
- data/lib/active_merchant/billing/gateways/moneris.rb +4 -0
- data/lib/active_merchant/billing/gateways/nab_transact.rb +244 -0
- data/lib/active_merchant/billing/gateways/ogone.rb +94 -56
- data/lib/active_merchant/billing/gateways/optimal_payment.rb +277 -0
- data/lib/active_merchant/billing/gateways/orbital.rb +57 -34
- data/lib/active_merchant/billing/gateways/pay_junction.rb +6 -1
- data/lib/active_merchant/billing/gateways/payflow/payflow_common_api.rb +1 -0
- data/lib/active_merchant/billing/gateways/payflow/payflow_express_response.rb +2 -2
- data/lib/active_merchant/billing/gateways/payflow.rb +10 -2
- data/lib/active_merchant/billing/gateways/paypal/paypal_common_api.rb +8 -5
- data/lib/active_merchant/billing/gateways/paypal_digital_goods.rb +43 -0
- data/lib/active_merchant/billing/gateways/paypal_express.rb +93 -40
- data/lib/active_merchant/billing/gateways/paypal_express_common.rb +8 -3
- data/lib/active_merchant/billing/gateways/qbms.rb +4 -0
- data/lib/active_merchant/billing/gateways/quickpay.rb +97 -22
- data/lib/active_merchant/billing/gateways/realex.rb +5 -1
- data/lib/active_merchant/billing/gateways/samurai.rb +121 -0
- data/lib/active_merchant/billing/gateways/secure_pay_au.rb +136 -49
- data/lib/active_merchant/billing/gateways/secure_pay_tech.rb +1 -1
- data/lib/active_merchant/billing/gateways/skip_jack.rb +7 -2
- data/lib/active_merchant/billing/gateways/stripe.rb +51 -19
- data/lib/active_merchant/billing/gateways/usa_epay.rb +13 -184
- data/lib/active_merchant/billing/gateways/usa_epay_advanced.rb +1496 -0
- data/lib/active_merchant/billing/gateways/usa_epay_transaction.rb +206 -0
- data/lib/active_merchant/billing/gateways/verifi.rb +2 -2
- data/lib/active_merchant/billing/gateways/viaklix.rb +1 -1
- data/lib/active_merchant/billing/gateways/worldpay.rb +1 -1
- data/lib/active_merchant/billing/integrations/action_view_helper.rb +6 -2
- data/lib/active_merchant/billing/integrations/authorize_net_sim/helper.rb +228 -0
- data/lib/active_merchant/billing/integrations/authorize_net_sim/notification.rb +340 -0
- data/lib/active_merchant/billing/integrations/authorize_net_sim.rb +38 -0
- data/lib/active_merchant/billing/integrations/direc_pay/helper.rb +4 -4
- data/lib/active_merchant/billing/integrations/dwolla/helper.rb +31 -0
- data/lib/active_merchant/billing/integrations/dwolla/notification.rb +55 -0
- data/lib/active_merchant/billing/integrations/dwolla/return.rb +38 -0
- data/lib/active_merchant/billing/integrations/dwolla.rb +30 -0
- data/lib/active_merchant/billing/integrations/helper.rb +19 -2
- data/lib/active_merchant/billing/integrations/ipay88/helper.rb +120 -0
- data/lib/active_merchant/billing/integrations/ipay88/return.rb +121 -0
- data/lib/active_merchant/billing/integrations/ipay88.rb +40 -0
- data/lib/active_merchant/billing/integrations/nochex.rb +1 -1
- data/lib/active_merchant/billing/integrations/payflow_link/helper.rb +100 -0
- data/lib/active_merchant/billing/integrations/payflow_link/notification.rb +78 -0
- data/lib/active_merchant/billing/integrations/payflow_link.rb +21 -0
- data/lib/active_merchant/billing/integrations/sage_pay_form/encryption.rb +4 -4
- data/lib/active_merchant/billing/integrations/sage_pay_form/helper.rb +18 -2
- data/lib/active_merchant/billing/integrations/two_checkout.rb +1 -2
- data/lib/active_merchant/railtie.rb +7 -7
- data/lib/active_merchant/railtie.rb.orig +19 -0
- data/lib/active_merchant/version.rb +1 -1
- data/lib/active_merchant.rb +23 -10
- data/lib/active_merchant.rb.orig +78 -0
- metadata +147 -63
- data/lib/active_merchant/common/connection.rb +0 -177
- data/lib/active_merchant/common/country.rb +0 -328
- data/lib/active_merchant/common/error.rb +0 -26
- data/lib/active_merchant/common/post_data.rb +0 -24
- data/lib/active_merchant/common/posts_data.rb +0 -63
- data/lib/active_merchant/common/requires_parameters.rb +0 -16
- data/lib/active_merchant/common/utils.rb +0 -22
- data/lib/active_merchant/common/validateable.rb +0 -81
- data/lib/active_merchant/common.rb +0 -14
- data/lib/certs/cacert.pem +0 -7815
@@ -0,0 +1,78 @@
|
|
1
|
+
#--
|
2
|
+
# Copyright (c) 2005-2010 Tobias Luetke
|
3
|
+
#
|
4
|
+
# Permission is hereby granted, free of charge, to any person obtaining
|
5
|
+
# a copy of this software and associated documentation files (the
|
6
|
+
# "Software"), to deal in the Software without restriction, including
|
7
|
+
# without limitation the rights to use, copy, modify, merge, publish,
|
8
|
+
# distribute, sublicense, and/or sell copies of the Software, and to
|
9
|
+
# permit persons to whom the Software is furnished to do so, subject to
|
10
|
+
# the following conditions:
|
11
|
+
#
|
12
|
+
# The above copyright notice and this permission notice shall be
|
13
|
+
# included in all copies or substantial portions of the Software.
|
14
|
+
#
|
15
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
16
|
+
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
17
|
+
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
18
|
+
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
19
|
+
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
20
|
+
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
21
|
+
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
22
|
+
#++
|
23
|
+
|
24
|
+
$:.unshift File.dirname(__FILE__)
|
25
|
+
|
26
|
+
require 'active_support'
|
27
|
+
require 'active_support/core_ext/string/inflections'
|
28
|
+
require 'active_support/core_ext/hash/indifferent_access'
|
29
|
+
require 'active_support/core_ext/hash/conversions'
|
30
|
+
<<<<<<< HEAD
|
31
|
+
require 'active_support/core_ext/object/conversions'
|
32
|
+
require 'active_support/core_ext/class/attribute'
|
33
|
+
require 'active_support/core_ext/class/attribute_accessors'
|
34
|
+
require 'active_support/core_ext/class/delegating_attributes'
|
35
|
+
require 'active_support/core_ext/module/attribute_accessors'
|
36
|
+
|
37
|
+
begin
|
38
|
+
require 'active_support/base64'
|
39
|
+
|
40
|
+
unless defined?(Base64)
|
41
|
+
Base64 = ActiveSupport::Base64
|
42
|
+
end
|
43
|
+
|
44
|
+
unless Base64.respond_to?(:strict_encode64)
|
45
|
+
def Base64.strict_encode64(v)
|
46
|
+
ActiveSupport::Base64.encode64s(v)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
rescue LoadError
|
50
|
+
require 'base64'
|
51
|
+
end
|
52
|
+
=======
|
53
|
+
require 'active_support/core_ext/class/inheritable_attributes'
|
54
|
+
require 'active_support/core_ext/class/attribute_accessors'
|
55
|
+
require 'active_support/core_ext/class/delegating_attributes'
|
56
|
+
require 'active_support/core_ext/module/attribute_accessors'
|
57
|
+
require 'active_support/core_ext/kernel/requires'
|
58
|
+
require 'active_support/base64'
|
59
|
+
require 'active_support/secure_random'
|
60
|
+
>>>>>>> Use Railtie to include view helpers in Rails 3
|
61
|
+
|
62
|
+
require 'builder'
|
63
|
+
require 'cgi'
|
64
|
+
require 'rexml/document'
|
65
|
+
|
66
|
+
require 'active_utils'
|
67
|
+
require 'active_merchant/billing'
|
68
|
+
require 'active_merchant/version'
|
69
|
+
|
70
|
+
require 'active_merchant/railtie' if defined?(::Rails)
|
71
|
+
|
72
|
+
module ActiveMerchant #:nodoc:
|
73
|
+
module Billing #:nodoc:
|
74
|
+
autoload :Integrations, 'active_merchant/billing/integrations'
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
require 'active_merchant/railtie' if defined?(Rails) && ActiveSupport::VERSION::MAJOR >= 3
|
metadata
CHANGED
@@ -1,60 +1,137 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: yetanothernguyen-activemerchant
|
3
|
-
version: !ruby/object:Gem::Version
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.21.0
|
4
5
|
prerelease:
|
5
|
-
version: 1.16.0
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
7
|
+
authors:
|
8
8
|
- Tobias Luetke
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
|
-
cert_chain:
|
11
|
+
cert_chain:
|
12
12
|
- gem-public_cert.pem
|
13
|
-
date:
|
14
|
-
|
15
|
-
|
16
|
-
- !ruby/object:Gem::Dependency
|
13
|
+
date: 2012-03-11 00:00:00.000000000Z
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
17
16
|
name: activesupport
|
18
|
-
requirement: &
|
17
|
+
requirement: &70196974851420 !ruby/object:Gem::Requirement
|
19
18
|
none: false
|
20
|
-
requirements:
|
21
|
-
- -
|
22
|
-
- !ruby/object:Gem::Version
|
19
|
+
requirements:
|
20
|
+
- - ! '>='
|
21
|
+
- !ruby/object:Gem::Version
|
23
22
|
version: 2.3.11
|
24
23
|
type: :runtime
|
25
24
|
prerelease: false
|
26
|
-
version_requirements: *
|
27
|
-
- !ruby/object:Gem::Dependency
|
25
|
+
version_requirements: *70196974851420
|
26
|
+
- !ruby/object:Gem::Dependency
|
27
|
+
name: i18n
|
28
|
+
requirement: &70196974849420 !ruby/object:Gem::Requirement
|
29
|
+
none: false
|
30
|
+
requirements:
|
31
|
+
- - ! '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: *70196974849420
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
name: money
|
39
|
+
requirement: &70196974847180 !ruby/object:Gem::Requirement
|
40
|
+
none: false
|
41
|
+
requirements:
|
42
|
+
- - ! '>='
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
version: '0'
|
45
|
+
type: :runtime
|
46
|
+
prerelease: false
|
47
|
+
version_requirements: *70196974847180
|
48
|
+
- !ruby/object:Gem::Dependency
|
28
49
|
name: builder
|
29
|
-
requirement: &
|
50
|
+
requirement: &70196974846060 !ruby/object:Gem::Requirement
|
30
51
|
none: false
|
31
|
-
requirements:
|
32
|
-
- -
|
33
|
-
- !ruby/object:Gem::Version
|
52
|
+
requirements:
|
53
|
+
- - ! '>='
|
54
|
+
- !ruby/object:Gem::Version
|
34
55
|
version: 2.0.0
|
35
56
|
type: :runtime
|
36
57
|
prerelease: false
|
37
|
-
version_requirements: *
|
38
|
-
- !ruby/object:Gem::Dependency
|
39
|
-
name:
|
40
|
-
requirement: &
|
58
|
+
version_requirements: *70196974846060
|
59
|
+
- !ruby/object:Gem::Dependency
|
60
|
+
name: json
|
61
|
+
requirement: &70196970814960 !ruby/object:Gem::Requirement
|
41
62
|
none: false
|
42
|
-
requirements:
|
43
|
-
- -
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
version:
|
63
|
+
requirements:
|
64
|
+
- - ! '>='
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
version: 1.5.1
|
67
|
+
type: :runtime
|
68
|
+
prerelease: false
|
69
|
+
version_requirements: *70196970814960
|
70
|
+
- !ruby/object:Gem::Dependency
|
71
|
+
name: active_utils
|
72
|
+
requirement: &70196970813200 !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ! '>='
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: 1.0.2
|
46
78
|
type: :runtime
|
47
79
|
prerelease: false
|
48
|
-
version_requirements: *
|
49
|
-
|
80
|
+
version_requirements: *70196970813200
|
81
|
+
- !ruby/object:Gem::Dependency
|
82
|
+
name: rake
|
83
|
+
requirement: &70196970812040 !ruby/object:Gem::Requirement
|
84
|
+
none: false
|
85
|
+
requirements:
|
86
|
+
- - ! '>='
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '0'
|
89
|
+
type: :development
|
90
|
+
prerelease: false
|
91
|
+
version_requirements: *70196970812040
|
92
|
+
- !ruby/object:Gem::Dependency
|
93
|
+
name: mocha
|
94
|
+
requirement: &70196970810720 !ruby/object:Gem::Requirement
|
95
|
+
none: false
|
96
|
+
requirements:
|
97
|
+
- - ! '>='
|
98
|
+
- !ruby/object:Gem::Version
|
99
|
+
version: '0'
|
100
|
+
type: :development
|
101
|
+
prerelease: false
|
102
|
+
version_requirements: *70196970810720
|
103
|
+
- !ruby/object:Gem::Dependency
|
104
|
+
name: rails
|
105
|
+
requirement: &70196970809160 !ruby/object:Gem::Requirement
|
106
|
+
none: false
|
107
|
+
requirements:
|
108
|
+
- - ! '>='
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 2.3.11
|
111
|
+
type: :development
|
112
|
+
prerelease: false
|
113
|
+
version_requirements: *70196970809160
|
114
|
+
- !ruby/object:Gem::Dependency
|
115
|
+
name: rubigen
|
116
|
+
requirement: &70196970806200 !ruby/object:Gem::Requirement
|
117
|
+
none: false
|
118
|
+
requirements:
|
119
|
+
- - ! '>='
|
120
|
+
- !ruby/object:Gem::Version
|
121
|
+
version: '0'
|
122
|
+
type: :development
|
123
|
+
prerelease: false
|
124
|
+
version_requirements: *70196970806200
|
125
|
+
description: Active Merchant is a simple payment abstraction library used in and sponsored
|
126
|
+
by Shopify. It is written by Tobias Luetke, Cody Fauser, and contributors. The aim
|
127
|
+
of the project is to feel natural to Ruby users and to abstract as many parts as
|
128
|
+
possible away from the user to offer a consistent interface across all supported
|
129
|
+
gateways.
|
50
130
|
email: tobi@leetsoft.com
|
51
131
|
executables: []
|
52
|
-
|
53
132
|
extensions: []
|
54
|
-
|
55
133
|
extra_rdoc_files: []
|
56
|
-
|
57
|
-
files:
|
134
|
+
files:
|
58
135
|
- CHANGELOG
|
59
136
|
- MIT-LICENSE
|
60
137
|
- CONTRIBUTORS
|
@@ -80,7 +157,9 @@ files:
|
|
80
157
|
- lib/active_merchant/billing/gateways/braintree.rb
|
81
158
|
- lib/active_merchant/billing/gateways/braintree_blue.rb
|
82
159
|
- lib/active_merchant/billing/gateways/braintree_orange.rb
|
160
|
+
- lib/active_merchant/billing/gateways/card_save.rb
|
83
161
|
- lib/active_merchant/billing/gateways/card_stream.rb
|
162
|
+
- lib/active_merchant/billing/gateways/certo_direct.rb
|
84
163
|
- lib/active_merchant/billing/gateways/cyber_source.rb
|
85
164
|
- lib/active_merchant/billing/gateways/data_cash.rb
|
86
165
|
- lib/active_merchant/billing/gateways/efsnet.rb
|
@@ -98,7 +177,9 @@ files:
|
|
98
177
|
- lib/active_merchant/billing/gateways/ideal_rabobank.rb
|
99
178
|
- lib/active_merchant/billing/gateways/inspire.rb
|
100
179
|
- lib/active_merchant/billing/gateways/instapay.rb
|
180
|
+
- lib/active_merchant/billing/gateways/ipay88.rb
|
101
181
|
- lib/active_merchant/billing/gateways/iridium.rb
|
182
|
+
- lib/active_merchant/billing/gateways/itransact.rb
|
102
183
|
- lib/active_merchant/billing/gateways/jetpay.rb
|
103
184
|
- lib/active_merchant/billing/gateways/linkpoint.rb
|
104
185
|
- lib/active_merchant/billing/gateways/merchant_e_solutions.rb
|
@@ -106,11 +187,13 @@ files:
|
|
106
187
|
- lib/active_merchant/billing/gateways/modern_payments.rb
|
107
188
|
- lib/active_merchant/billing/gateways/modern_payments_cim.rb
|
108
189
|
- lib/active_merchant/billing/gateways/moneris.rb
|
190
|
+
- lib/active_merchant/billing/gateways/nab_transact.rb
|
109
191
|
- lib/active_merchant/billing/gateways/net_registry.rb
|
110
192
|
- lib/active_merchant/billing/gateways/netaxept.rb
|
111
193
|
- lib/active_merchant/billing/gateways/netbilling.rb
|
112
194
|
- lib/active_merchant/billing/gateways/nmi.rb
|
113
195
|
- lib/active_merchant/billing/gateways/ogone.rb
|
196
|
+
- lib/active_merchant/billing/gateways/optimal_payment.rb
|
114
197
|
- lib/active_merchant/billing/gateways/orbital/orbital_soft_descriptors.rb
|
115
198
|
- lib/active_merchant/billing/gateways/orbital.rb
|
116
199
|
- lib/active_merchant/billing/gateways/pay_junction.rb
|
@@ -128,6 +211,7 @@ files:
|
|
128
211
|
- lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb
|
129
212
|
- lib/active_merchant/billing/gateways/paypal.rb
|
130
213
|
- lib/active_merchant/billing/gateways/paypal_ca.rb
|
214
|
+
- lib/active_merchant/billing/gateways/paypal_digital_goods.rb
|
131
215
|
- lib/active_merchant/billing/gateways/paypal_express.rb
|
132
216
|
- lib/active_merchant/billing/gateways/paypal_express_common.rb
|
133
217
|
- lib/active_merchant/billing/gateways/paystation.rb
|
@@ -144,6 +228,7 @@ files:
|
|
144
228
|
- lib/active_merchant/billing/gateways/sage.rb
|
145
229
|
- lib/active_merchant/billing/gateways/sage_pay.rb
|
146
230
|
- lib/active_merchant/billing/gateways/sallie_mae.rb
|
231
|
+
- lib/active_merchant/billing/gateways/samurai.rb
|
147
232
|
- lib/active_merchant/billing/gateways/secure_net.rb
|
148
233
|
- lib/active_merchant/billing/gateways/secure_pay.rb
|
149
234
|
- lib/active_merchant/billing/gateways/secure_pay_au.rb
|
@@ -155,12 +240,17 @@ files:
|
|
155
240
|
- lib/active_merchant/billing/gateways/transax.rb
|
156
241
|
- lib/active_merchant/billing/gateways/trust_commerce.rb
|
157
242
|
- lib/active_merchant/billing/gateways/usa_epay.rb
|
243
|
+
- lib/active_merchant/billing/gateways/usa_epay_advanced.rb
|
244
|
+
- lib/active_merchant/billing/gateways/usa_epay_transaction.rb
|
158
245
|
- lib/active_merchant/billing/gateways/verifi.rb
|
159
246
|
- lib/active_merchant/billing/gateways/viaklix.rb
|
160
247
|
- lib/active_merchant/billing/gateways/wirecard.rb
|
161
248
|
- lib/active_merchant/billing/gateways/worldpay.rb
|
162
249
|
- lib/active_merchant/billing/gateways.rb
|
163
250
|
- lib/active_merchant/billing/integrations/action_view_helper.rb
|
251
|
+
- lib/active_merchant/billing/integrations/authorize_net_sim/helper.rb
|
252
|
+
- lib/active_merchant/billing/integrations/authorize_net_sim/notification.rb
|
253
|
+
- lib/active_merchant/billing/integrations/authorize_net_sim.rb
|
164
254
|
- lib/active_merchant/billing/integrations/bogus/helper.rb
|
165
255
|
- lib/active_merchant/billing/integrations/bogus/notification.rb
|
166
256
|
- lib/active_merchant/billing/integrations/bogus/return.rb
|
@@ -178,6 +268,10 @@ files:
|
|
178
268
|
- lib/active_merchant/billing/integrations/directebanking/notification.rb
|
179
269
|
- lib/active_merchant/billing/integrations/directebanking/return.rb
|
180
270
|
- lib/active_merchant/billing/integrations/directebanking.rb
|
271
|
+
- lib/active_merchant/billing/integrations/dwolla/helper.rb
|
272
|
+
- lib/active_merchant/billing/integrations/dwolla/notification.rb
|
273
|
+
- lib/active_merchant/billing/integrations/dwolla/return.rb
|
274
|
+
- lib/active_merchant/billing/integrations/dwolla.rb
|
181
275
|
- lib/active_merchant/billing/integrations/e_payment_plans/helper.rb
|
182
276
|
- lib/active_merchant/billing/integrations/e_payment_plans/notification.rb
|
183
277
|
- lib/active_merchant/billing/integrations/e_payment_plans.rb
|
@@ -191,6 +285,9 @@ files:
|
|
191
285
|
- lib/active_merchant/billing/integrations/hi_trust/notification.rb
|
192
286
|
- lib/active_merchant/billing/integrations/hi_trust/return.rb
|
193
287
|
- lib/active_merchant/billing/integrations/hi_trust.rb
|
288
|
+
- lib/active_merchant/billing/integrations/ipay88/helper.rb
|
289
|
+
- lib/active_merchant/billing/integrations/ipay88/return.rb
|
290
|
+
- lib/active_merchant/billing/integrations/ipay88.rb
|
194
291
|
- lib/active_merchant/billing/integrations/migs/helper.rb
|
195
292
|
- lib/active_merchant/billing/integrations/migs/return.rb
|
196
293
|
- lib/active_merchant/billing/integrations/migs.rb
|
@@ -202,6 +299,9 @@ files:
|
|
202
299
|
- lib/active_merchant/billing/integrations/nochex/return.rb
|
203
300
|
- lib/active_merchant/billing/integrations/nochex.rb
|
204
301
|
- lib/active_merchant/billing/integrations/notification.rb
|
302
|
+
- lib/active_merchant/billing/integrations/payflow_link/helper.rb
|
303
|
+
- lib/active_merchant/billing/integrations/payflow_link/notification.rb
|
304
|
+
- lib/active_merchant/billing/integrations/payflow_link.rb
|
205
305
|
- lib/active_merchant/billing/integrations/paypal/helper.rb
|
206
306
|
- lib/active_merchant/billing/integrations/paypal/notification.rb
|
207
307
|
- lib/active_merchant/billing/integrations/paypal/return.rb
|
@@ -230,52 +330,36 @@ files:
|
|
230
330
|
- lib/active_merchant/billing/integrations.rb
|
231
331
|
- lib/active_merchant/billing/response.rb
|
232
332
|
- lib/active_merchant/billing.rb
|
233
|
-
- lib/active_merchant/common/connection.rb
|
234
|
-
- lib/active_merchant/common/country.rb
|
235
|
-
- lib/active_merchant/common/error.rb
|
236
|
-
- lib/active_merchant/common/post_data.rb
|
237
|
-
- lib/active_merchant/common/posts_data.rb
|
238
|
-
- lib/active_merchant/common/requires_parameters.rb
|
239
|
-
- lib/active_merchant/common/utils.rb
|
240
|
-
- lib/active_merchant/common/validateable.rb
|
241
|
-
- lib/active_merchant/common.rb
|
242
333
|
- lib/active_merchant/railtie.rb
|
334
|
+
- lib/active_merchant/railtie.rb.orig
|
243
335
|
- lib/active_merchant/version.rb
|
244
336
|
- lib/active_merchant.rb
|
337
|
+
- lib/active_merchant.rb.orig
|
245
338
|
- lib/activemerchant.rb
|
246
|
-
- lib/certs/cacert.pem
|
247
339
|
- lib/support/gateway_support.rb
|
248
340
|
- lib/support/outbound_hosts.rb
|
249
|
-
has_rdoc: true
|
250
341
|
homepage: http://activemerchant.org/
|
251
342
|
licenses: []
|
252
|
-
|
253
343
|
post_install_message:
|
254
344
|
rdoc_options: []
|
255
|
-
|
256
|
-
require_paths:
|
345
|
+
require_paths:
|
257
346
|
- lib
|
258
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
347
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
259
348
|
none: false
|
260
|
-
requirements:
|
261
|
-
- -
|
262
|
-
- !ruby/object:Gem::Version
|
263
|
-
|
264
|
-
|
265
|
-
- 0
|
266
|
-
version: "0"
|
267
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
349
|
+
requirements:
|
350
|
+
- - ! '>='
|
351
|
+
- !ruby/object:Gem::Version
|
352
|
+
version: '0'
|
353
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
268
354
|
none: false
|
269
|
-
requirements:
|
270
|
-
- -
|
271
|
-
- !ruby/object:Gem::Version
|
272
|
-
version:
|
355
|
+
requirements:
|
356
|
+
- - ! '>='
|
357
|
+
- !ruby/object:Gem::Version
|
358
|
+
version: '0'
|
273
359
|
requirements: []
|
274
|
-
|
275
360
|
rubyforge_project: activemerchant
|
276
|
-
rubygems_version: 1.
|
361
|
+
rubygems_version: 1.8.10
|
277
362
|
signing_key:
|
278
363
|
specification_version: 3
|
279
364
|
summary: Framework and tools for dealing with credit card transactions.
|
280
365
|
test_files: []
|
281
|
-
|
@@ -1,177 +0,0 @@
|
|
1
|
-
require 'uri'
|
2
|
-
require 'net/http'
|
3
|
-
require 'net/https'
|
4
|
-
require 'benchmark'
|
5
|
-
|
6
|
-
module ActiveMerchant
|
7
|
-
class ConnectionError < ActiveMerchantError # :nodoc:
|
8
|
-
end
|
9
|
-
|
10
|
-
class RetriableConnectionError < ConnectionError # :nodoc:
|
11
|
-
end
|
12
|
-
|
13
|
-
class ResponseError < ActiveMerchantError # :nodoc:
|
14
|
-
attr_reader :response
|
15
|
-
|
16
|
-
def initialize(response, message = nil)
|
17
|
-
@response = response
|
18
|
-
@message = message
|
19
|
-
end
|
20
|
-
|
21
|
-
def to_s
|
22
|
-
"Failed with #{response.code} #{response.message if response.respond_to?(:message)}"
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
class Connection
|
27
|
-
MAX_RETRIES = 3
|
28
|
-
OPEN_TIMEOUT = 60
|
29
|
-
READ_TIMEOUT = 60
|
30
|
-
VERIFY_PEER = true
|
31
|
-
RETRY_SAFE = false
|
32
|
-
RUBY_184_POST_HEADERS = { "Content-Type" => "application/x-www-form-urlencoded" }
|
33
|
-
|
34
|
-
attr_accessor :endpoint
|
35
|
-
attr_accessor :open_timeout
|
36
|
-
attr_accessor :read_timeout
|
37
|
-
attr_accessor :verify_peer
|
38
|
-
attr_accessor :retry_safe
|
39
|
-
attr_accessor :pem
|
40
|
-
attr_accessor :pem_password
|
41
|
-
attr_accessor :wiredump_device
|
42
|
-
attr_accessor :logger
|
43
|
-
attr_accessor :tag
|
44
|
-
attr_accessor :ignore_http_status
|
45
|
-
|
46
|
-
def initialize(endpoint)
|
47
|
-
@endpoint = endpoint.is_a?(URI) ? endpoint : URI.parse(endpoint)
|
48
|
-
@open_timeout = OPEN_TIMEOUT
|
49
|
-
@read_timeout = READ_TIMEOUT
|
50
|
-
@retry_safe = RETRY_SAFE
|
51
|
-
@verify_peer = VERIFY_PEER
|
52
|
-
@ignore_http_status = false
|
53
|
-
end
|
54
|
-
|
55
|
-
def request(method, body, headers = {})
|
56
|
-
retry_exceptions do
|
57
|
-
begin
|
58
|
-
info "#{method.to_s.upcase} #{endpoint}", tag
|
59
|
-
|
60
|
-
result = nil
|
61
|
-
|
62
|
-
realtime = Benchmark.realtime do
|
63
|
-
result = case method
|
64
|
-
when :get
|
65
|
-
raise ArgumentError, "GET requests do not support a request body" if body
|
66
|
-
http.get(endpoint.request_uri, headers)
|
67
|
-
when :post
|
68
|
-
debug body
|
69
|
-
http.post(endpoint.request_uri, body, RUBY_184_POST_HEADERS.merge(headers))
|
70
|
-
else
|
71
|
-
raise ArgumentError, "Unsupported request method #{method.to_s.upcase}"
|
72
|
-
end
|
73
|
-
end
|
74
|
-
|
75
|
-
info "--> %d %s (%d %.4fs)" % [result.code, result.message, result.body ? result.body.length : 0, realtime], tag
|
76
|
-
debug result.body
|
77
|
-
result
|
78
|
-
rescue EOFError => e
|
79
|
-
raise ConnectionError, "The remote server dropped the connection"
|
80
|
-
rescue Errno::ECONNRESET => e
|
81
|
-
raise ConnectionError, "The remote server reset the connection"
|
82
|
-
rescue Errno::ECONNREFUSED => e
|
83
|
-
raise RetriableConnectionError, "The remote server refused the connection"
|
84
|
-
rescue OpenSSL::X509::CertificateError => e
|
85
|
-
raise ClientCertificateError, "The remote server did not accept the provided SSL certificate"
|
86
|
-
rescue Timeout::Error, Errno::ETIMEDOUT => e
|
87
|
-
raise ConnectionError, "The connection to the remote server timed out"
|
88
|
-
end
|
89
|
-
end
|
90
|
-
end
|
91
|
-
|
92
|
-
private
|
93
|
-
def http
|
94
|
-
http = Net::HTTP.new(endpoint.host, endpoint.port)
|
95
|
-
configure_debugging(http)
|
96
|
-
configure_timeouts(http)
|
97
|
-
configure_ssl(http)
|
98
|
-
configure_cert(http)
|
99
|
-
http
|
100
|
-
end
|
101
|
-
|
102
|
-
def configure_debugging(http)
|
103
|
-
http.set_debug_output(wiredump_device)
|
104
|
-
end
|
105
|
-
|
106
|
-
def configure_timeouts(http)
|
107
|
-
http.open_timeout = open_timeout
|
108
|
-
http.read_timeout = read_timeout
|
109
|
-
end
|
110
|
-
|
111
|
-
def configure_ssl(http)
|
112
|
-
return unless endpoint.scheme == "https"
|
113
|
-
|
114
|
-
http.use_ssl = true
|
115
|
-
|
116
|
-
if verify_peer
|
117
|
-
http.verify_mode = OpenSSL::SSL::VERIFY_PEER
|
118
|
-
http.ca_file = File.dirname(__FILE__) + '/../../certs/cacert.pem'
|
119
|
-
else
|
120
|
-
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
121
|
-
end
|
122
|
-
end
|
123
|
-
|
124
|
-
def configure_cert(http)
|
125
|
-
return if pem.blank?
|
126
|
-
|
127
|
-
http.cert = OpenSSL::X509::Certificate.new(pem)
|
128
|
-
|
129
|
-
if pem_password
|
130
|
-
http.key = OpenSSL::PKey::RSA.new(pem, pem_password)
|
131
|
-
else
|
132
|
-
http.key = OpenSSL::PKey::RSA.new(pem)
|
133
|
-
end
|
134
|
-
end
|
135
|
-
|
136
|
-
def retry_exceptions
|
137
|
-
retries = MAX_RETRIES
|
138
|
-
begin
|
139
|
-
yield
|
140
|
-
rescue RetriableConnectionError => e
|
141
|
-
retries -= 1
|
142
|
-
retry unless retries.zero?
|
143
|
-
raise ConnectionError, e.message
|
144
|
-
rescue ConnectionError
|
145
|
-
retries -= 1
|
146
|
-
retry if retry_safe && !retries.zero?
|
147
|
-
raise
|
148
|
-
end
|
149
|
-
end
|
150
|
-
|
151
|
-
def handle_response(response)
|
152
|
-
if @ignore_http_status then
|
153
|
-
return response.body
|
154
|
-
else
|
155
|
-
case response.code.to_i
|
156
|
-
when 200...300
|
157
|
-
response.body
|
158
|
-
else
|
159
|
-
raise ResponseError.new(response)
|
160
|
-
end
|
161
|
-
end
|
162
|
-
end
|
163
|
-
|
164
|
-
def debug(message, tag = nil)
|
165
|
-
log(:debug, message, tag)
|
166
|
-
end
|
167
|
-
|
168
|
-
def info(message, tag = nil)
|
169
|
-
log(:info, message, tag)
|
170
|
-
end
|
171
|
-
|
172
|
-
def log(level, message, tag)
|
173
|
-
message = "[#{tag}] #{message}" if tag
|
174
|
-
logger.send(level, message) if logger
|
175
|
-
end
|
176
|
-
end
|
177
|
-
end
|