offsite_payments 2.7.4 → 2.7.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/offsite_payments/integrations/moneybookers.rb +51 -14
- data/lib/offsite_payments/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b9952e1ee49372892fbb3f4b7f3114f58b857fcb
|
4
|
+
data.tar.gz: 10aa54a2d1b8b5041bd362955c5ab88ea3dffe32
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5669f57fb9e86bcdcd691dd837a7dcf70a8b44fd4a07da2f30e607412c6fffb840cceb6fba5b07274eced324e7d7fbdabf6de387baabbfbee8e919455f41b4f5
|
7
|
+
data.tar.gz: 6d4feddce25300c3c5a04665e23794b12c8db4905b8b28c55e1e2f1c21e8ecc3f25e740851db762bdbce82cd85240920e4381f84e1f2981b4cec0628049ee46a
|
@@ -4,16 +4,18 @@ module OffsitePayments #:nodoc:
|
|
4
4
|
mattr_accessor :production_url
|
5
5
|
self.production_url = 'https://pay.skrill.com'
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
|
7
|
+
class << self
|
8
|
+
def service_url
|
9
|
+
production_url
|
10
|
+
end
|
10
11
|
|
11
|
-
|
12
|
-
|
13
|
-
|
12
|
+
def notification(post, options)
|
13
|
+
Notification.new(post, options)
|
14
|
+
end
|
14
15
|
|
15
|
-
|
16
|
-
|
16
|
+
def return(post, options = {})
|
17
|
+
Return.new(post, options)
|
18
|
+
end
|
17
19
|
end
|
18
20
|
|
19
21
|
class Helper < OffsitePayments::Helper
|
@@ -44,13 +46,11 @@ module OffsitePayments #:nodoc:
|
|
44
46
|
MAPPED_COUNTRY_CODES = {
|
45
47
|
'SE' => 'SV',
|
46
48
|
'DK' => 'DA'
|
47
|
-
}
|
49
|
+
}.freeze
|
48
50
|
|
49
|
-
SUPPORTED_COUNTRY_CODES = [
|
50
|
-
|
51
|
-
|
52
|
-
'RU', 'TR', 'CN', 'CZ', 'NL'
|
53
|
-
]
|
51
|
+
SUPPORTED_COUNTRY_CODES = %w[
|
52
|
+
FI DE ES FR IT PL GR RO RU TR CN CZ NL
|
53
|
+
].freeze
|
54
54
|
|
55
55
|
def initialize(order, account, options = {})
|
56
56
|
super
|
@@ -85,6 +85,34 @@ module OffsitePayments #:nodoc:
|
|
85
85
|
end
|
86
86
|
|
87
87
|
class Notification < OffsitePayments::Notification
|
88
|
+
FAILED_REASON_CODES = {
|
89
|
+
'1' => "Referred by card issuer",
|
90
|
+
'2' => "Invalid Merchant",
|
91
|
+
'3' => "Stolen card",
|
92
|
+
'4' => "Declined by customer's Card Issuer",
|
93
|
+
'5' => "Insufficient funds",
|
94
|
+
'8' => "PIN tries exceed - card blocked",
|
95
|
+
'9' => "Invalid Transaction",
|
96
|
+
'10' => "Transaction frequency limit exceeded",
|
97
|
+
'12' => "Invalid credit card or bank account",
|
98
|
+
'15' => "Duplicate transaction",
|
99
|
+
'19' => "Unknown failure reason. Try again",
|
100
|
+
'24' => "Card expired",
|
101
|
+
'28' => "Lost/Stolen card",
|
102
|
+
'32' => "Card Security Code check failed",
|
103
|
+
'37' => "Card restricted by card issuer",
|
104
|
+
'38' => "Security violation",
|
105
|
+
'42' => "Card blocked by card issuer",
|
106
|
+
'44' => "Customer's issuing bank not available",
|
107
|
+
'51' => "Processing system error",
|
108
|
+
'63' => "Transaction not permitted to cardholder",
|
109
|
+
'70' => "Customer failed to complete 3DS",
|
110
|
+
'71' => "Customer failed SMS verification",
|
111
|
+
'80' => "Fraud engine declined",
|
112
|
+
'98' => "Error in communication with provider",
|
113
|
+
'99' => "Failure reason not specified"
|
114
|
+
}.freeze
|
115
|
+
|
88
116
|
def complete?
|
89
117
|
status == 'Completed'
|
90
118
|
end
|
@@ -115,6 +143,15 @@ module OffsitePayments #:nodoc:
|
|
115
143
|
params['status']
|
116
144
|
end
|
117
145
|
|
146
|
+
def message
|
147
|
+
return unless failed_reason_code
|
148
|
+
FAILED_REASON_CODES[failed_reason_code]
|
149
|
+
end
|
150
|
+
|
151
|
+
def failed_reason_code
|
152
|
+
params['failed_reason_code']
|
153
|
+
end
|
154
|
+
|
118
155
|
def item_id
|
119
156
|
params['transaction_id']
|
120
157
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: offsite_payments
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.7.
|
4
|
+
version: 2.7.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tobias Luetke
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-06-
|
11
|
+
date: 2018-06-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|