api_banking 0.1.30 → 0.1.31
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/api_banking/environment/rbl/env.rb +1 -1
- data/lib/api_banking/json/json_client.rb +4 -3
- data/lib/api_banking/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: b2178f6d8ccccd6e69d0c4cbef8bfb5d64b7308d
|
4
|
+
data.tar.gz: fea3b71ebe63bdf0a43fd9b9c3365adc3f1d98f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d2a1b33833059350833bbd92ee9c863d6eb0a5a905220d37cd38132d22b7dc1cee7269cba3871786cef0dfcf6e1ca76bfc3ab40a3e42fba28681fdac1ae01e70
|
7
|
+
data.tar.gz: a2e5cfda51434dba797a3750fc500ae17adda4a015db1c7b5e09062da36d8ed1377dc9e16db767c7dcb0a2f97cc3c88ad6e5b16619a9b3036738f62eb790ff4a
|
@@ -14,7 +14,7 @@ module ApiBanking
|
|
14
14
|
end
|
15
15
|
end
|
16
16
|
|
17
|
-
|
17
|
+
PRD = Struct.new(:user, :password, :client_id, :client_secret, :ssl_client_cert, :ssl_client_key, :ssl_ca_file, :endpoints) do
|
18
18
|
def initialize(*)
|
19
19
|
super
|
20
20
|
self.ssl_ca_file ||= File.expand_path('./prd.pem', File.dirname(__FILE__))
|
@@ -42,7 +42,7 @@ module ApiBanking
|
|
42
42
|
end
|
43
43
|
|
44
44
|
def self.set_options_for_environment(env, options)
|
45
|
-
if env.kind_of?ApiBanking::Environment::RBL::UAT
|
45
|
+
if env.kind_of?ApiBanking::Environment::RBL::UAT or env.kind_of?ApiBanking::Environment::RBL::PROD
|
46
46
|
options[:userpwd] = "#{env.user}:#{env.password}"
|
47
47
|
options[:cainfo] = env.ssl_ca_file
|
48
48
|
options[:sslkey] = env.ssl_client_key
|
@@ -57,13 +57,14 @@ module ApiBanking
|
|
57
57
|
p response.response_body
|
58
58
|
|
59
59
|
if response.success?
|
60
|
-
|
60
|
+
# RBL does not set the content-type correctly, it sends text/plain for json!
|
61
|
+
# if response.headers['Content-Type'] =~ /json/
|
61
62
|
j = JSON::parse(response.response_body)
|
62
63
|
if j.first[1]['Header']['Status'] == 'FAILED'
|
63
64
|
return Fault.new(j.first[1]['Header']['Error_Cde'], nil, j.first[1]['Header']['Error_Desc'])
|
64
65
|
end
|
65
66
|
return j
|
66
|
-
end
|
67
|
+
# end
|
67
68
|
elsif response.timed_out?
|
68
69
|
return Fault.new("502", "", "#{response.return_message}")
|
69
70
|
elsif response.code == 0
|
data/lib/api_banking/version.rb
CHANGED