activemerchant 1.29.3 → 1.30.0
Sign up to get free protection for your applications and to get access to all the features.
- data.tar.gz.sig +0 -0
- data/CHANGELOG +39 -0
- data/CONTRIBUTORS +19 -0
- data/README.md +43 -41
- data/lib/active_merchant/billing/check.rb +15 -11
- data/lib/active_merchant/billing/credit_card.rb +5 -1
- data/lib/active_merchant/billing/credit_card_formatting.rb +8 -8
- data/lib/active_merchant/billing/gateway.rb +1 -1
- data/lib/active_merchant/billing/gateways/authorize_net.rb +9 -1
- data/lib/active_merchant/billing/gateways/authorize_net_cim.rb +15 -4
- data/lib/active_merchant/billing/gateways/balanced.rb +9 -3
- data/lib/active_merchant/billing/gateways/banwire.rb +15 -1
- data/lib/active_merchant/billing/gateways/beanstream.rb +26 -24
- data/lib/active_merchant/billing/gateways/beanstream/beanstream_core.rb +6 -2
- data/lib/active_merchant/billing/gateways/braintree_blue.rb +5 -2
- data/lib/active_merchant/billing/gateways/cyber_source.rb +55 -22
- data/lib/active_merchant/billing/gateways/eway.rb +114 -171
- data/lib/active_merchant/billing/gateways/eway_managed.rb +52 -22
- data/lib/active_merchant/billing/gateways/firstdata_e4.rb +222 -0
- data/lib/active_merchant/billing/gateways/ideal_rabobank.rb +13 -2
- data/lib/active_merchant/billing/gateways/litle.rb +50 -19
- data/lib/active_merchant/billing/gateways/merchant_ware.rb +44 -9
- data/lib/active_merchant/billing/gateways/merchant_warrior.rb +190 -0
- data/lib/active_merchant/billing/gateways/moneris.rb +2 -4
- data/lib/active_merchant/billing/gateways/nab_transact.rb +20 -3
- data/lib/active_merchant/billing/gateways/netbilling.rb +1 -0
- data/lib/active_merchant/billing/gateways/netpay.rb +223 -0
- data/lib/active_merchant/billing/gateways/optimal_payment.rb +18 -3
- data/lib/active_merchant/billing/gateways/orbital.rb +9 -5
- data/lib/active_merchant/billing/gateways/payment_express.rb +62 -1
- data/lib/active_merchant/billing/gateways/paypal/paypal_common_api.rb +1 -1
- data/lib/active_merchant/billing/gateways/paypal_express.rb +2 -0
- data/lib/active_merchant/billing/gateways/pin.rb +157 -0
- data/lib/active_merchant/billing/gateways/qbms.rb +3 -2
- data/lib/active_merchant/billing/gateways/quickpay.rb +66 -28
- data/lib/active_merchant/billing/gateways/sage_pay.rb +6 -0
- data/lib/active_merchant/billing/gateways/smart_ps.rb +1 -1
- data/lib/active_merchant/billing/gateways/spreedly_core.rb +235 -0
- data/lib/active_merchant/billing/gateways/stripe.rb +1 -0
- data/lib/active_merchant/billing/gateways/wirecard.rb +15 -9
- data/lib/active_merchant/billing/integrations/payflow_link/helper.rb +4 -1
- data/lib/active_merchant/billing/integrations/paypal/notification.rb +39 -31
- data/lib/active_merchant/billing/integrations/quickpay/helper.rb +13 -10
- data/lib/active_merchant/billing/integrations/quickpay/notification.rb +14 -14
- data/lib/active_merchant/version.rb +1 -1
- metadata +109 -49
- metadata.gz.sig +0 -0
@@ -7,39 +7,40 @@ module ActiveMerchant #:nodoc:
|
|
7
7
|
def initialize(order, account, options = {})
|
8
8
|
md5secret options.delete(:credential2)
|
9
9
|
super
|
10
|
-
add_field('protocol', '
|
10
|
+
add_field('protocol', '6')
|
11
11
|
add_field('msgtype', 'authorize')
|
12
12
|
add_field('language', 'da')
|
13
13
|
add_field('autocapture', 0)
|
14
14
|
add_field('testmode', test? ? 1 : 0)
|
15
15
|
add_field('ordernumber', format_order_number(order))
|
16
16
|
end
|
17
|
-
|
17
|
+
|
18
18
|
def md5secret(value)
|
19
19
|
@md5secret = value
|
20
20
|
end
|
21
|
-
|
21
|
+
|
22
22
|
def form_fields
|
23
23
|
@fields.merge('md5check' => generate_md5check)
|
24
24
|
end
|
25
|
-
|
25
|
+
|
26
26
|
def generate_md5string
|
27
27
|
MD5_CHECK_FIELDS.map {|key| @fields[key.to_s]} * "" + @md5secret
|
28
28
|
end
|
29
|
-
|
29
|
+
|
30
30
|
def generate_md5check
|
31
31
|
Digest::MD5.hexdigest(generate_md5string)
|
32
32
|
end
|
33
33
|
|
34
34
|
# Limited to 20 digits max
|
35
35
|
def format_order_number(number)
|
36
|
-
number.to_s.gsub(/[^\
|
36
|
+
number.to_s.gsub(/[^\w]/, '').rjust(4, "0")[0...20]
|
37
37
|
end
|
38
|
-
|
38
|
+
|
39
39
|
MD5_CHECK_FIELDS = [
|
40
|
-
:protocol, :msgtype, :merchant, :language, :ordernumber,
|
40
|
+
:protocol, :msgtype, :merchant, :language, :ordernumber,
|
41
41
|
:amount, :currency, :continueurl, :cancelurl, :callbackurl,
|
42
|
-
:autocapture, :cardtypelock, :description, :ipaddress, :testmode
|
42
|
+
:autocapture, :cardtypelock, :description, :ipaddress, :testmode,
|
43
|
+
:deadline, :cardhash
|
43
44
|
]
|
44
45
|
|
45
46
|
mapping :protocol, 'protocol'
|
@@ -48,7 +49,7 @@ module ActiveMerchant #:nodoc:
|
|
48
49
|
mapping :language, 'language'
|
49
50
|
mapping :amount, 'amount'
|
50
51
|
mapping :currency, 'currency'
|
51
|
-
|
52
|
+
|
52
53
|
mapping :return_url, 'continueurl'
|
53
54
|
mapping :cancel_return_url, 'cancelurl'
|
54
55
|
mapping :notify_url, 'callbackurl'
|
@@ -59,6 +60,8 @@ module ActiveMerchant #:nodoc:
|
|
59
60
|
mapping :description, 'description'
|
60
61
|
mapping :ipaddress, 'ipaddress'
|
61
62
|
mapping :testmode, 'testmode'
|
63
|
+
mapping :deadline, 'deadline'
|
64
|
+
mapping :cardhash, 'cardhash'
|
62
65
|
|
63
66
|
mapping :customer, ''
|
64
67
|
mapping :billing_address, {}
|
@@ -7,7 +7,7 @@ module ActiveMerchant #:nodoc:
|
|
7
7
|
class Notification < ActiveMerchant::Billing::Integrations::Notification
|
8
8
|
def complete?
|
9
9
|
status == '000'
|
10
|
-
end
|
10
|
+
end
|
11
11
|
|
12
12
|
def item_id
|
13
13
|
params['ordernumber']
|
@@ -18,7 +18,10 @@ module ActiveMerchant #:nodoc:
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def received_at
|
21
|
-
|
21
|
+
time = params['time']
|
22
|
+
# If time only contains 12 integers then it's pre v5 format
|
23
|
+
time = "20#{params['time']}" if /[0-9]{12}/.match(params['time'])
|
24
|
+
Time.parse(time)
|
22
25
|
end
|
23
26
|
|
24
27
|
def gross
|
@@ -29,10 +32,6 @@ module ActiveMerchant #:nodoc:
|
|
29
32
|
params['amount'].to_i
|
30
33
|
end
|
31
34
|
|
32
|
-
def test?
|
33
|
-
params['testmode'] == 'Yes'
|
34
|
-
end
|
35
|
-
|
36
35
|
def status
|
37
36
|
params['qpstat']
|
38
37
|
end
|
@@ -40,9 +39,9 @@ module ActiveMerchant #:nodoc:
|
|
40
39
|
def currency
|
41
40
|
params['currency']
|
42
41
|
end
|
43
|
-
|
42
|
+
|
44
43
|
# Provide access to raw fields from quickpay
|
45
|
-
%w(msgtype ordernumber state chstat chstatmsg qpstat qpstatmsg merchant merchantemail cardtype cardnumber).each do |attr|
|
44
|
+
%w(msgtype ordernumber state chstat chstatmsg qpstat qpstatmsg merchant merchantemail cardtype cardnumber splitpayment fraudprobability fraudremarks fraudreport fee).each do |attr|
|
46
45
|
define_method(attr) do
|
47
46
|
params[attr]
|
48
47
|
end
|
@@ -50,21 +49,22 @@ module ActiveMerchant #:nodoc:
|
|
50
49
|
|
51
50
|
MD5_CHECK_FIELDS = [
|
52
51
|
:msgtype, :ordernumber, :amount, :currency, :time, :state,
|
53
|
-
:
|
54
|
-
:transaction, :cardtype, :cardnumber, :
|
52
|
+
:qpstat, :qpstatmsg, :chstat, :chstatmsg, :merchant, :merchantemail,
|
53
|
+
:transaction, :cardtype, :cardnumber, :splitpayment, :fraudprobability,
|
54
|
+
:fraudremarks, :fraudreport, :fee
|
55
55
|
]
|
56
56
|
|
57
57
|
def generate_md5string
|
58
|
-
MD5_CHECK_FIELDS.map { |key| params[key.to_s] } * "" + @options[:credential2]
|
58
|
+
MD5_CHECK_FIELDS.map { |key| params[key.to_s] } * "" + @options[:credential2].to_s
|
59
59
|
end
|
60
|
-
|
60
|
+
|
61
61
|
def generate_md5check
|
62
62
|
Digest::MD5.hexdigest(generate_md5string)
|
63
63
|
end
|
64
|
-
|
64
|
+
|
65
65
|
# Quickpay doesn't do acknowledgements of callback notifications
|
66
66
|
# Instead it uses and MD5 hash of all parameters
|
67
|
-
def acknowledge
|
67
|
+
def acknowledge
|
68
68
|
generate_md5check == params['md5check']
|
69
69
|
end
|
70
70
|
end
|
metadata
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activemerchant
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.29.3
|
5
4
|
prerelease:
|
5
|
+
version: 1.30.0
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Tobias Luetke
|
@@ -37,129 +37,184 @@ cert_chain:
|
|
37
37
|
Z1BvU1BxN25rK3MyRlFVQko5VVpGSzFsZ016aG8vNGZaZ3pKd2J1K2NPOFNO
|
38
38
|
dWFMUy9iagpoUGFTVHlWVTB5Q1Nudz09Ci0tLS0tRU5EIENFUlRJRklDQVRF
|
39
39
|
LS0tLS0K
|
40
|
-
date:
|
40
|
+
date: 2013-02-13 00:00:00.000000000 Z
|
41
41
|
dependencies:
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
|
-
|
44
|
-
requirement: &70282608718400 !ruby/object:Gem::Requirement
|
45
|
-
none: false
|
43
|
+
version_requirements: !ruby/object:Gem::Requirement
|
46
44
|
requirements:
|
47
45
|
- - ! '>='
|
48
46
|
- !ruby/object:Gem::Version
|
49
47
|
version: 2.3.14
|
48
|
+
none: false
|
49
|
+
name: activesupport
|
50
50
|
type: :runtime
|
51
51
|
prerelease: false
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
52
|
+
requirement: !ruby/object:Gem::Requirement
|
53
|
+
requirements:
|
54
|
+
- - ! '>='
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: 2.3.14
|
56
57
|
none: false
|
58
|
+
- !ruby/object:Gem::Dependency
|
59
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
60
|
requirements:
|
58
61
|
- - ! '>='
|
59
62
|
- !ruby/object:Gem::Version
|
60
63
|
version: '0'
|
64
|
+
none: false
|
65
|
+
name: i18n
|
61
66
|
type: :runtime
|
62
67
|
prerelease: false
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
68
|
+
requirement: !ruby/object:Gem::Requirement
|
69
|
+
requirements:
|
70
|
+
- - ! '>='
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
version: '0'
|
67
73
|
none: false
|
74
|
+
- !ruby/object:Gem::Dependency
|
75
|
+
version_requirements: !ruby/object:Gem::Requirement
|
68
76
|
requirements:
|
69
77
|
- - ! '>='
|
70
78
|
- !ruby/object:Gem::Version
|
71
79
|
version: '0'
|
80
|
+
none: false
|
81
|
+
name: money
|
72
82
|
type: :runtime
|
73
83
|
prerelease: false
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
84
|
+
requirement: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - ! '>='
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '0'
|
78
89
|
none: false
|
90
|
+
- !ruby/object:Gem::Dependency
|
91
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
92
|
requirements:
|
80
93
|
- - ! '>='
|
81
94
|
- !ruby/object:Gem::Version
|
82
95
|
version: 2.0.0
|
96
|
+
none: false
|
97
|
+
name: builder
|
83
98
|
type: :runtime
|
84
99
|
prerelease: false
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
100
|
+
requirement: !ruby/object:Gem::Requirement
|
101
|
+
requirements:
|
102
|
+
- - ! '>='
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: 2.0.0
|
89
105
|
none: false
|
106
|
+
- !ruby/object:Gem::Dependency
|
107
|
+
version_requirements: !ruby/object:Gem::Requirement
|
90
108
|
requirements:
|
91
109
|
- - ! '>='
|
92
110
|
- !ruby/object:Gem::Version
|
93
111
|
version: 1.5.1
|
112
|
+
none: false
|
113
|
+
name: json
|
94
114
|
type: :runtime
|
95
115
|
prerelease: false
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
116
|
+
requirement: !ruby/object:Gem::Requirement
|
117
|
+
requirements:
|
118
|
+
- - ! '>='
|
119
|
+
- !ruby/object:Gem::Version
|
120
|
+
version: 1.5.1
|
100
121
|
none: false
|
122
|
+
- !ruby/object:Gem::Dependency
|
123
|
+
version_requirements: !ruby/object:Gem::Requirement
|
101
124
|
requirements:
|
102
125
|
- - ! '>='
|
103
126
|
- !ruby/object:Gem::Version
|
104
127
|
version: 1.0.2
|
128
|
+
none: false
|
129
|
+
name: active_utils
|
105
130
|
type: :runtime
|
106
131
|
prerelease: false
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
132
|
+
requirement: !ruby/object:Gem::Requirement
|
133
|
+
requirements:
|
134
|
+
- - ! '>='
|
135
|
+
- !ruby/object:Gem::Version
|
136
|
+
version: 1.0.2
|
111
137
|
none: false
|
138
|
+
- !ruby/object:Gem::Dependency
|
139
|
+
version_requirements: !ruby/object:Gem::Requirement
|
112
140
|
requirements:
|
113
141
|
- - ! '>='
|
114
142
|
- !ruby/object:Gem::Version
|
115
143
|
version: '0'
|
144
|
+
none: false
|
145
|
+
name: nokogiri
|
116
146
|
type: :runtime
|
117
147
|
prerelease: false
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
148
|
+
requirement: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ! '>='
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
122
153
|
none: false
|
154
|
+
- !ruby/object:Gem::Dependency
|
155
|
+
version_requirements: !ruby/object:Gem::Requirement
|
123
156
|
requirements:
|
124
157
|
- - ! '>='
|
125
158
|
- !ruby/object:Gem::Version
|
126
159
|
version: '0'
|
160
|
+
none: false
|
161
|
+
name: rake
|
127
162
|
type: :development
|
128
163
|
prerelease: false
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
164
|
+
requirement: !ruby/object:Gem::Requirement
|
165
|
+
requirements:
|
166
|
+
- - ! '>='
|
167
|
+
- !ruby/object:Gem::Version
|
168
|
+
version: '0'
|
133
169
|
none: false
|
170
|
+
- !ruby/object:Gem::Dependency
|
171
|
+
version_requirements: !ruby/object:Gem::Requirement
|
134
172
|
requirements:
|
135
173
|
- - ~>
|
136
174
|
- !ruby/object:Gem::Version
|
137
175
|
version: 0.11.3
|
176
|
+
none: false
|
177
|
+
name: mocha
|
138
178
|
type: :development
|
139
179
|
prerelease: false
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
180
|
+
requirement: !ruby/object:Gem::Requirement
|
181
|
+
requirements:
|
182
|
+
- - ~>
|
183
|
+
- !ruby/object:Gem::Version
|
184
|
+
version: 0.11.3
|
144
185
|
none: false
|
186
|
+
- !ruby/object:Gem::Dependency
|
187
|
+
version_requirements: !ruby/object:Gem::Requirement
|
145
188
|
requirements:
|
146
189
|
- - ! '>='
|
147
190
|
- !ruby/object:Gem::Version
|
148
191
|
version: 2.3.14
|
192
|
+
none: false
|
193
|
+
name: rails
|
149
194
|
type: :development
|
150
195
|
prerelease: false
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
196
|
+
requirement: !ruby/object:Gem::Requirement
|
197
|
+
requirements:
|
198
|
+
- - ! '>='
|
199
|
+
- !ruby/object:Gem::Version
|
200
|
+
version: 2.3.14
|
155
201
|
none: false
|
202
|
+
- !ruby/object:Gem::Dependency
|
203
|
+
version_requirements: !ruby/object:Gem::Requirement
|
156
204
|
requirements:
|
157
205
|
- - ! '>='
|
158
206
|
- !ruby/object:Gem::Version
|
159
207
|
version: '0'
|
208
|
+
none: false
|
209
|
+
name: thor
|
160
210
|
type: :development
|
161
211
|
prerelease: false
|
162
|
-
|
212
|
+
requirement: !ruby/object:Gem::Requirement
|
213
|
+
requirements:
|
214
|
+
- - ! '>='
|
215
|
+
- !ruby/object:Gem::Version
|
216
|
+
version: '0'
|
217
|
+
none: false
|
163
218
|
description: Active Merchant is a simple payment abstraction library used in and sponsored
|
164
219
|
by Shopify. It is written by Tobias Luetke, Cody Fauser, and contributors. The aim
|
165
220
|
of the project is to feel natural to Ruby users and to abstract as many parts as
|
@@ -213,6 +268,7 @@ files:
|
|
213
268
|
- lib/active_merchant/billing/gateways/fat_zebra.rb
|
214
269
|
- lib/active_merchant/billing/gateways/federated_canada.rb
|
215
270
|
- lib/active_merchant/billing/gateways/first_pay.rb
|
271
|
+
- lib/active_merchant/billing/gateways/firstdata_e4.rb
|
216
272
|
- lib/active_merchant/billing/gateways/garanti.rb
|
217
273
|
- lib/active_merchant/billing/gateways/hdfc.rb
|
218
274
|
- lib/active_merchant/billing/gateways/ideal/ideal_base.rb
|
@@ -228,6 +284,7 @@ files:
|
|
228
284
|
- lib/active_merchant/billing/gateways/litle.rb
|
229
285
|
- lib/active_merchant/billing/gateways/merchant_e_solutions.rb
|
230
286
|
- lib/active_merchant/billing/gateways/merchant_ware.rb
|
287
|
+
- lib/active_merchant/billing/gateways/merchant_warrior.rb
|
231
288
|
- lib/active_merchant/billing/gateways/mercury.rb
|
232
289
|
- lib/active_merchant/billing/gateways/metrics_global.rb
|
233
290
|
- lib/active_merchant/billing/gateways/migs/migs_codes.rb
|
@@ -240,6 +297,7 @@ files:
|
|
240
297
|
- lib/active_merchant/billing/gateways/net_registry.rb
|
241
298
|
- lib/active_merchant/billing/gateways/netaxept.rb
|
242
299
|
- lib/active_merchant/billing/gateways/netbilling.rb
|
300
|
+
- lib/active_merchant/billing/gateways/netpay.rb
|
243
301
|
- lib/active_merchant/billing/gateways/nmi.rb
|
244
302
|
- lib/active_merchant/billing/gateways/ogone.rb
|
245
303
|
- lib/active_merchant/billing/gateways/optimal_payment.rb
|
@@ -268,6 +326,7 @@ files:
|
|
268
326
|
- lib/active_merchant/billing/gateways/paypal_express_common.rb
|
269
327
|
- lib/active_merchant/billing/gateways/paystation.rb
|
270
328
|
- lib/active_merchant/billing/gateways/payway.rb
|
329
|
+
- lib/active_merchant/billing/gateways/pin.rb
|
271
330
|
- lib/active_merchant/billing/gateways/plugnpay.rb
|
272
331
|
- lib/active_merchant/billing/gateways/psigate.rb
|
273
332
|
- lib/active_merchant/billing/gateways/psl_card.rb
|
@@ -289,6 +348,7 @@ files:
|
|
289
348
|
- lib/active_merchant/billing/gateways/secure_pay_tech.rb
|
290
349
|
- lib/active_merchant/billing/gateways/skip_jack.rb
|
291
350
|
- lib/active_merchant/billing/gateways/smart_ps.rb
|
351
|
+
- lib/active_merchant/billing/gateways/spreedly_core.rb
|
292
352
|
- lib/active_merchant/billing/gateways/stripe.rb
|
293
353
|
- lib/active_merchant/billing/gateways/trans_first.rb
|
294
354
|
- lib/active_merchant/billing/gateways/transax.rb
|
@@ -452,20 +512,20 @@ rdoc_options: []
|
|
452
512
|
require_paths:
|
453
513
|
- lib
|
454
514
|
required_ruby_version: !ruby/object:Gem::Requirement
|
455
|
-
none: false
|
456
515
|
requirements:
|
457
516
|
- - ! '>='
|
458
517
|
- !ruby/object:Gem::Version
|
459
518
|
version: '0'
|
460
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
461
519
|
none: false
|
520
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
462
521
|
requirements:
|
463
522
|
- - ! '>='
|
464
523
|
- !ruby/object:Gem::Version
|
465
524
|
version: '0'
|
525
|
+
none: false
|
466
526
|
requirements: []
|
467
527
|
rubyforge_project: activemerchant
|
468
|
-
rubygems_version: 1.8.
|
528
|
+
rubygems_version: 1.8.23
|
469
529
|
signing_key:
|
470
530
|
specification_version: 3
|
471
531
|
summary: Framework and tools for dealing with credit card transactions.
|
metadata.gz.sig
CHANGED
Binary file
|