transact_pro 0.9.3 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/transact_pro/request.rb +1 -1
- data/lib/transact_pro/request_specs.rb +2 -2
- data/lib/transact_pro/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a61a340bcd548c37ea3fb9bff35bc6acde5e4ca0
|
4
|
+
data.tar.gz: 930cc8543977ee7350121a09183fdb642e584286
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4f0468f50993f45e68391cfb39e30c2b3b259bf5816e94d552ebcd69664fbc63152786c106f25578524be81a2127c149e157214b13436e8a2db0a121ca5f4e83
|
7
|
+
data.tar.gz: c360ddb045d8f0666d34fc2fd488d64efe6a4e606cb6908c3340e8897e37c1a671d898954d934eb873e4a1acce4e462af2fc347570958c72be84d94e3c46a746
|
data/Gemfile.lock
CHANGED
data/lib/transact_pro/request.rb
CHANGED
@@ -74,7 +74,7 @@ class TransactPro::Request
|
|
74
74
|
private
|
75
75
|
|
76
76
|
def validate(key, string, regex)
|
77
|
-
unless string[regex]
|
77
|
+
unless string.to_s[regex]
|
78
78
|
raise TransactPro::Request::ValidationError.new(
|
79
79
|
":#{key} with value '#{string}' is invalid for request, "\
|
80
80
|
"expected a match for regex #{regex.inspect}"
|
@@ -17,7 +17,7 @@ module TransactPro
|
|
17
17
|
PASSWORD_DIGEST_REGEX = %r'\A.{40}\z'
|
18
18
|
ROUTING_REGEX = %r'\A[[:alnum:]]{1,12}\z' # an(1..12)
|
19
19
|
MERCHANT_TRANSACTION_ID = %r'\A.{5,50}\z' # ans(5..50)
|
20
|
-
TID_REGEX = %r'\A[0-9a-f]
|
20
|
+
TID_REGEX = %r'\A[0-9a-f]{40}\z'i # h(40)
|
21
21
|
USER_IP = %r'\A
|
22
22
|
(
|
23
23
|
([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.
|
@@ -25,7 +25,7 @@ module TransactPro
|
|
25
25
|
([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])
|
26
26
|
\z'x # ns(7..15)
|
27
27
|
DESCRIPTION = %r'\A.{5,255}\z' # uns(5..255)
|
28
|
-
AMOUNT = %r'\A[1-9]\d{2,}\z' # n
|
28
|
+
AMOUNT = %r'\A[1-9]\d{2,}\z' # n(3+)
|
29
29
|
CURRENCY = %r'\A[[:upper:]]{3}\z' # a(3)
|
30
30
|
NAME_ON_CARD = %r'\A.{2,100}\z' # ans(2..100)
|
31
31
|
STREET = %r'\A.{2,50}\z' # ans(2..50)
|
data/lib/transact_pro/version.rb
CHANGED