activemerchant 1.24.0 → 1.25.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 +31 -0
- data/CONTRIBUTORS +12 -0
- data/README.md +1 -0
- data/lib/active_merchant/billing/base.rb +8 -9
- data/lib/active_merchant/billing/gateway.rb +31 -31
- data/lib/active_merchant/billing/gateways/authorize_net.rb +25 -24
- data/lib/active_merchant/billing/gateways/braintree_blue.rb +45 -1
- data/lib/active_merchant/billing/gateways/cyber_source.rb +157 -29
- data/lib/active_merchant/billing/gateways/eway.rb +17 -8
- data/lib/active_merchant/billing/gateways/fat_zebra.rb +152 -0
- data/lib/active_merchant/billing/gateways/litle.rb +0 -1
- data/lib/active_merchant/billing/gateways/metrics_global.rb +323 -0
- data/lib/active_merchant/billing/gateways/orbital.rb +12 -9
- data/lib/active_merchant/billing/gateways/usa_epay_transaction.rb +7 -3
- data/lib/active_merchant/billing/gateways/wirecard.rb +79 -84
- data/lib/active_merchant/billing/integrations/easy_pay.rb +30 -0
- data/lib/active_merchant/billing/integrations/easy_pay/common.rb +40 -0
- data/lib/active_merchant/billing/integrations/easy_pay/helper.rb +40 -0
- data/lib/active_merchant/billing/integrations/easy_pay/notification.rb +51 -0
- data/lib/active_merchant/billing/integrations/payflow_link/helper.rb +1 -1
- data/lib/active_merchant/billing/integrations/paypal_payments_advanced.rb +20 -0
- data/lib/active_merchant/billing/integrations/paypal_payments_advanced/helper.rb +15 -0
- data/lib/active_merchant/version.rb +1 -1
- metadata +39 -25
- metadata.gz.sig +0 -0
@@ -0,0 +1,30 @@
|
|
1
|
+
module ActiveMerchant #:nodoc:
|
2
|
+
module Billing #:nodoc:
|
3
|
+
module Integrations #:nodoc:
|
4
|
+
|
5
|
+
# Documentation: https://ssl.easypay.by/light/
|
6
|
+
module EasyPay
|
7
|
+
autoload :Helper, File.dirname(__FILE__) + '/easy_pay/helper.rb'
|
8
|
+
autoload :Notification, File.dirname(__FILE__) + '/easy_pay/notification.rb'
|
9
|
+
autoload :Common, File.dirname(__FILE__) + '/easy_pay/common.rb'
|
10
|
+
|
11
|
+
mattr_accessor :signature_parameter_name
|
12
|
+
self.signature_parameter_name = 'EP_Hash'
|
13
|
+
|
14
|
+
mattr_accessor :notify_signature_parameter_name
|
15
|
+
self.notify_signature_parameter_name = 'notify_signature'
|
16
|
+
|
17
|
+
mattr_accessor :service_url
|
18
|
+
self.service_url = 'https://ssl.easypay.by/weborder/'
|
19
|
+
|
20
|
+
def self.helper(order, account, options = {})
|
21
|
+
Helper.new(order, account, options)
|
22
|
+
end
|
23
|
+
|
24
|
+
def self.notification(query_string, options = {})
|
25
|
+
Notification.new(query_string, options)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
module ActiveMerchant #:nodoc:
|
2
|
+
module Billing #:nodoc:
|
3
|
+
module Integrations #:nodoc:
|
4
|
+
module EasyPay
|
5
|
+
module Common
|
6
|
+
def generate_signature(type)
|
7
|
+
string = case type
|
8
|
+
when :request
|
9
|
+
request_signature_string
|
10
|
+
when :notify
|
11
|
+
notify_signature_string
|
12
|
+
end
|
13
|
+
|
14
|
+
Digest::MD5.hexdigest(string)
|
15
|
+
end
|
16
|
+
|
17
|
+
def request_signature_string
|
18
|
+
[
|
19
|
+
@fields[mappings[:account]],
|
20
|
+
secret,
|
21
|
+
@fields[mappings[:order]],
|
22
|
+
@fields[mappings[:amount]]
|
23
|
+
].join
|
24
|
+
end
|
25
|
+
|
26
|
+
def notify_signature_string
|
27
|
+
[
|
28
|
+
params['order_mer_code'],
|
29
|
+
params['sum'],
|
30
|
+
params['mer_no'],
|
31
|
+
params['card'],
|
32
|
+
params['purch_date'],
|
33
|
+
secret
|
34
|
+
].join
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
module ActiveMerchant #:nodoc:
|
2
|
+
module Billing #:nodoc:
|
3
|
+
module Integrations #:nodoc:
|
4
|
+
module EasyPay
|
5
|
+
class Helper < ActiveMerchant::Billing::Integrations::Helper
|
6
|
+
include Common
|
7
|
+
|
8
|
+
def initialize(order, account, options = {})
|
9
|
+
@md5secret = options.delete(:secret)
|
10
|
+
super
|
11
|
+
end
|
12
|
+
|
13
|
+
def form_fields
|
14
|
+
@fields.merge(ActiveMerchant::Billing::Integrations::EasyPay.signature_parameter_name => generate_signature(:request))
|
15
|
+
end
|
16
|
+
|
17
|
+
def params
|
18
|
+
@fields
|
19
|
+
end
|
20
|
+
|
21
|
+
def secret
|
22
|
+
@md5secret
|
23
|
+
end
|
24
|
+
|
25
|
+
mapping :account, 'EP_MerNo'
|
26
|
+
mapping :amount, 'EP_Sum'
|
27
|
+
mapping :order, 'EP_OrderNo'
|
28
|
+
mapping :comment, 'EP_Comment'
|
29
|
+
mapping :order_info, 'EP_OrderInfo'
|
30
|
+
mapping :expires, 'EP_Expires'
|
31
|
+
mapping :success_url, 'EP_Success_URL'
|
32
|
+
mapping :cancel_url, 'EP_Cancel_URL'
|
33
|
+
mapping :debug, 'EP_Debug'
|
34
|
+
mapping :url_type, 'EP_URL_Type'
|
35
|
+
mapping :encoding, 'EP_Encoding'
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
module ActiveMerchant #:nodoc:
|
2
|
+
module Billing #:nodoc:
|
3
|
+
module Integrations #:nodoc:
|
4
|
+
module EasyPay
|
5
|
+
class Notification < ActiveMerchant::Billing::Integrations::Notification
|
6
|
+
include Common
|
7
|
+
|
8
|
+
def self.recognizes?(params)
|
9
|
+
params.has_key?('order_mer_code') && params.has_key?('sum')
|
10
|
+
end
|
11
|
+
|
12
|
+
def complete?
|
13
|
+
true
|
14
|
+
end
|
15
|
+
|
16
|
+
def amount
|
17
|
+
BigDecimal.new(gross)
|
18
|
+
end
|
19
|
+
|
20
|
+
def item_id
|
21
|
+
params['order_mer_code']
|
22
|
+
end
|
23
|
+
|
24
|
+
def security_key
|
25
|
+
params[ActiveMerchant::Billing::Integrations::EasyPay.notify_signature_parameter_name]
|
26
|
+
end
|
27
|
+
|
28
|
+
def gross
|
29
|
+
params['sum']
|
30
|
+
end
|
31
|
+
|
32
|
+
def status
|
33
|
+
'success'
|
34
|
+
end
|
35
|
+
|
36
|
+
def secret
|
37
|
+
@options[:secret]
|
38
|
+
end
|
39
|
+
|
40
|
+
def acknowledge
|
41
|
+
security_key == generate_signature(:notify)
|
42
|
+
end
|
43
|
+
|
44
|
+
def success_response(*args)
|
45
|
+
{ :nothing => true }
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
@@ -12,7 +12,7 @@ module ActiveMerchant #:nodoc:
|
|
12
12
|
add_field('user2', self.test?)
|
13
13
|
add_field('invoice', order)
|
14
14
|
add_field('vendor', account)
|
15
|
-
add_field('user', options[:credential4] || account)
|
15
|
+
add_field('user', options[:credential4].presence || account)
|
16
16
|
add_field('trxtype', options[:transaction_type] || 'S')
|
17
17
|
end
|
18
18
|
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module ActiveMerchant
|
2
|
+
module Billing
|
3
|
+
module Integrations
|
4
|
+
module PaypalPaymentsAdvanced
|
5
|
+
autoload :Helper, 'active_merchant/billing/integrations/paypal_payments_advanced/helper.rb'
|
6
|
+
|
7
|
+
mattr_accessor :service_url
|
8
|
+
self.service_url = 'https://payflowlink.paypal.com'
|
9
|
+
|
10
|
+
def self.notification(post, options = {})
|
11
|
+
PayflowLink::Notification.new(post)
|
12
|
+
end
|
13
|
+
|
14
|
+
def self.return(query_string, options = {})
|
15
|
+
Return.new(query_string)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module ActiveMerchant
|
2
|
+
module Billing
|
3
|
+
module Integrations
|
4
|
+
module PaypalPaymentsAdvanced
|
5
|
+
class Helper < PayflowLink::Helper
|
6
|
+
|
7
|
+
def initialize(order, account, options)
|
8
|
+
super
|
9
|
+
add_field('partner', 'PayPal')
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activemerchant
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.25.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -50,11 +50,11 @@ cert_chain:
|
|
50
50
|
-----END CERTIFICATE-----
|
51
51
|
|
52
52
|
'
|
53
|
-
date: 2012-
|
53
|
+
date: 2012-07-03 00:00:00.000000000 Z
|
54
54
|
dependencies:
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: activesupport
|
57
|
-
requirement: &
|
57
|
+
requirement: &70187328041800 !ruby/object:Gem::Requirement
|
58
58
|
none: false
|
59
59
|
requirements:
|
60
60
|
- - ! '>='
|
@@ -62,10 +62,10 @@ dependencies:
|
|
62
62
|
version: 2.3.11
|
63
63
|
type: :runtime
|
64
64
|
prerelease: false
|
65
|
-
version_requirements: *
|
65
|
+
version_requirements: *70187328041800
|
66
66
|
- !ruby/object:Gem::Dependency
|
67
67
|
name: i18n
|
68
|
-
requirement: &
|
68
|
+
requirement: &70187328041340 !ruby/object:Gem::Requirement
|
69
69
|
none: false
|
70
70
|
requirements:
|
71
71
|
- - ! '>='
|
@@ -73,10 +73,10 @@ dependencies:
|
|
73
73
|
version: '0'
|
74
74
|
type: :runtime
|
75
75
|
prerelease: false
|
76
|
-
version_requirements: *
|
76
|
+
version_requirements: *70187328041340
|
77
77
|
- !ruby/object:Gem::Dependency
|
78
78
|
name: money
|
79
|
-
requirement: &
|
79
|
+
requirement: &70187328040860 !ruby/object:Gem::Requirement
|
80
80
|
none: false
|
81
81
|
requirements:
|
82
82
|
- - ! '>='
|
@@ -84,10 +84,10 @@ dependencies:
|
|
84
84
|
version: '0'
|
85
85
|
type: :runtime
|
86
86
|
prerelease: false
|
87
|
-
version_requirements: *
|
87
|
+
version_requirements: *70187328040860
|
88
88
|
- !ruby/object:Gem::Dependency
|
89
89
|
name: builder
|
90
|
-
requirement: &
|
90
|
+
requirement: &70187328040200 !ruby/object:Gem::Requirement
|
91
91
|
none: false
|
92
92
|
requirements:
|
93
93
|
- - ! '>='
|
@@ -95,10 +95,10 @@ dependencies:
|
|
95
95
|
version: 2.0.0
|
96
96
|
type: :runtime
|
97
97
|
prerelease: false
|
98
|
-
version_requirements: *
|
98
|
+
version_requirements: *70187328040200
|
99
99
|
- !ruby/object:Gem::Dependency
|
100
100
|
name: json
|
101
|
-
requirement: &
|
101
|
+
requirement: &70187328039620 !ruby/object:Gem::Requirement
|
102
102
|
none: false
|
103
103
|
requirements:
|
104
104
|
- - ! '>='
|
@@ -106,10 +106,10 @@ dependencies:
|
|
106
106
|
version: 1.5.1
|
107
107
|
type: :runtime
|
108
108
|
prerelease: false
|
109
|
-
version_requirements: *
|
109
|
+
version_requirements: *70187328039620
|
110
110
|
- !ruby/object:Gem::Dependency
|
111
111
|
name: active_utils
|
112
|
-
requirement: &
|
112
|
+
requirement: &70187328039080 !ruby/object:Gem::Requirement
|
113
113
|
none: false
|
114
114
|
requirements:
|
115
115
|
- - ! '>='
|
@@ -117,10 +117,10 @@ dependencies:
|
|
117
117
|
version: 1.0.2
|
118
118
|
type: :runtime
|
119
119
|
prerelease: false
|
120
|
-
version_requirements: *
|
120
|
+
version_requirements: *70187328039080
|
121
121
|
- !ruby/object:Gem::Dependency
|
122
122
|
name: nokogiri
|
123
|
-
requirement: &
|
123
|
+
requirement: &70187328038600 !ruby/object:Gem::Requirement
|
124
124
|
none: false
|
125
125
|
requirements:
|
126
126
|
- - ! '>='
|
@@ -128,10 +128,10 @@ dependencies:
|
|
128
128
|
version: '0'
|
129
129
|
type: :runtime
|
130
130
|
prerelease: false
|
131
|
-
version_requirements: *
|
131
|
+
version_requirements: *70187328038600
|
132
132
|
- !ruby/object:Gem::Dependency
|
133
133
|
name: rake
|
134
|
-
requirement: &
|
134
|
+
requirement: &70187328038140 !ruby/object:Gem::Requirement
|
135
135
|
none: false
|
136
136
|
requirements:
|
137
137
|
- - ! '>='
|
@@ -139,10 +139,10 @@ dependencies:
|
|
139
139
|
version: '0'
|
140
140
|
type: :development
|
141
141
|
prerelease: false
|
142
|
-
version_requirements: *
|
142
|
+
version_requirements: *70187328038140
|
143
143
|
- !ruby/object:Gem::Dependency
|
144
144
|
name: mocha
|
145
|
-
requirement: &
|
145
|
+
requirement: &70187328037540 !ruby/object:Gem::Requirement
|
146
146
|
none: false
|
147
147
|
requirements:
|
148
148
|
- - ~>
|
@@ -150,10 +150,10 @@ dependencies:
|
|
150
150
|
version: 0.11.3
|
151
151
|
type: :development
|
152
152
|
prerelease: false
|
153
|
-
version_requirements: *
|
153
|
+
version_requirements: *70187328037540
|
154
154
|
- !ruby/object:Gem::Dependency
|
155
155
|
name: rails
|
156
|
-
requirement: &
|
156
|
+
requirement: &70187328037020 !ruby/object:Gem::Requirement
|
157
157
|
none: false
|
158
158
|
requirements:
|
159
159
|
- - ! '>='
|
@@ -161,10 +161,10 @@ dependencies:
|
|
161
161
|
version: 2.3.11
|
162
162
|
type: :development
|
163
163
|
prerelease: false
|
164
|
-
version_requirements: *
|
164
|
+
version_requirements: *70187328037020
|
165
165
|
- !ruby/object:Gem::Dependency
|
166
166
|
name: rubigen
|
167
|
-
requirement: &
|
167
|
+
requirement: &70187328052900 !ruby/object:Gem::Requirement
|
168
168
|
none: false
|
169
169
|
requirements:
|
170
170
|
- - ! '>='
|
@@ -172,7 +172,7 @@ dependencies:
|
|
172
172
|
version: '0'
|
173
173
|
type: :development
|
174
174
|
prerelease: false
|
175
|
-
version_requirements: *
|
175
|
+
version_requirements: *70187328052900
|
176
176
|
description: Active Merchant is a simple payment abstraction library used in and sponsored
|
177
177
|
by Shopify. It is written by Tobias Luetke, Cody Fauser, and contributors. The aim
|
178
178
|
of the project is to feel natural to Ruby users and to abstract as many parts as
|
@@ -220,6 +220,7 @@ files:
|
|
220
220
|
- lib/active_merchant/billing/gateways/eway.rb
|
221
221
|
- lib/active_merchant/billing/gateways/eway_managed.rb
|
222
222
|
- lib/active_merchant/billing/gateways/exact.rb
|
223
|
+
- lib/active_merchant/billing/gateways/fat_zebra.rb
|
223
224
|
- lib/active_merchant/billing/gateways/federated_canada.rb
|
224
225
|
- lib/active_merchant/billing/gateways/first_pay.rb
|
225
226
|
- lib/active_merchant/billing/gateways/garanti.rb
|
@@ -236,6 +237,7 @@ files:
|
|
236
237
|
- lib/active_merchant/billing/gateways/litle.rb
|
237
238
|
- lib/active_merchant/billing/gateways/merchant_e_solutions.rb
|
238
239
|
- lib/active_merchant/billing/gateways/merchant_ware.rb
|
240
|
+
- lib/active_merchant/billing/gateways/metrics_global.rb
|
239
241
|
- lib/active_merchant/billing/gateways/migs/migs_codes.rb
|
240
242
|
- lib/active_merchant/billing/gateways/migs.rb
|
241
243
|
- lib/active_merchant/billing/gateways/modern_payments.rb
|
@@ -336,6 +338,10 @@ files:
|
|
336
338
|
- lib/active_merchant/billing/integrations/e_payment_plans/helper.rb
|
337
339
|
- lib/active_merchant/billing/integrations/e_payment_plans/notification.rb
|
338
340
|
- lib/active_merchant/billing/integrations/e_payment_plans.rb
|
341
|
+
- lib/active_merchant/billing/integrations/easy_pay/common.rb
|
342
|
+
- lib/active_merchant/billing/integrations/easy_pay/helper.rb
|
343
|
+
- lib/active_merchant/billing/integrations/easy_pay/notification.rb
|
344
|
+
- lib/active_merchant/billing/integrations/easy_pay.rb
|
339
345
|
- lib/active_merchant/billing/integrations/epay/helper.rb
|
340
346
|
- lib/active_merchant/billing/integrations/epay/notification.rb
|
341
347
|
- lib/active_merchant/billing/integrations/epay.rb
|
@@ -364,6 +370,8 @@ files:
|
|
364
370
|
- lib/active_merchant/billing/integrations/paypal/notification.rb
|
365
371
|
- lib/active_merchant/billing/integrations/paypal/return.rb
|
366
372
|
- lib/active_merchant/billing/integrations/paypal.rb
|
373
|
+
- lib/active_merchant/billing/integrations/paypal_payments_advanced/helper.rb
|
374
|
+
- lib/active_merchant/billing/integrations/paypal_payments_advanced.rb
|
367
375
|
- lib/active_merchant/billing/integrations/quickpay/helper.rb
|
368
376
|
- lib/active_merchant/billing/integrations/quickpay/notification.rb
|
369
377
|
- lib/active_merchant/billing/integrations/quickpay.rb
|
@@ -413,15 +421,21 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
413
421
|
- - ! '>='
|
414
422
|
- !ruby/object:Gem::Version
|
415
423
|
version: '0'
|
424
|
+
segments:
|
425
|
+
- 0
|
426
|
+
hash: 3496413810224124962
|
416
427
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
417
428
|
none: false
|
418
429
|
requirements:
|
419
430
|
- - ! '>='
|
420
431
|
- !ruby/object:Gem::Version
|
421
432
|
version: '0'
|
433
|
+
segments:
|
434
|
+
- 0
|
435
|
+
hash: 3496413810224124962
|
422
436
|
requirements: []
|
423
437
|
rubyforge_project: activemerchant
|
424
|
-
rubygems_version: 1.8.
|
438
|
+
rubygems_version: 1.8.11
|
425
439
|
signing_key:
|
426
440
|
specification_version: 3
|
427
441
|
summary: Framework and tools for dealing with credit card transactions.
|
metadata.gz.sig
CHANGED
Binary file
|