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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d1c84af30cf15aa8aaf729b27d8528f3a7565dda
4
- data.tar.gz: 483604578b3a1b6d7da92b243c7cbac4397c670d
3
+ metadata.gz: b2178f6d8ccccd6e69d0c4cbef8bfb5d64b7308d
4
+ data.tar.gz: fea3b71ebe63bdf0a43fd9b9c3365adc3f1d98f1
5
5
  SHA512:
6
- metadata.gz: 19cecc7afee70d64452662203bba4e7af3d096bbc95dbb7191011f1fd542ff73967919c4e15ecd5fefe5411cb19781f4a5e19c41cf9d31a836bc936de09956e4
7
- data.tar.gz: eebd7fa0930ac1d30fb45b7281a7c1b232f721ff2c39a35e8434082d94a1df94646191c9339ec18bef4b2fa9f758742fded9e30160542d4962e66d07600a5b18
6
+ metadata.gz: d2a1b33833059350833bbd92ee9c863d6eb0a5a905220d37cd38132d22b7dc1cee7269cba3871786cef0dfcf6e1ca76bfc3ab40a3e42fba28681fdac1ae01e70
7
+ data.tar.gz: a2e5cfda51434dba797a3750fc500ae17adda4a015db1c7b5e09062da36d8ed1377dc9e16db767c7dcb0a2f97cc3c88ad6e5b16619a9b3036738f62eb790ff4a
@@ -14,7 +14,7 @@ module ApiBanking
14
14
  end
15
15
  end
16
16
 
17
- PROD = Struct.new(:user, :password, :client_id, :client_secret, :ssl_client_cert, :ssl_client_key, :ssl_ca_file, :endpoints) do
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
- if response.headers['Content-Type'] =~ /json/
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
@@ -1,3 +1,3 @@
1
1
  module ApiBanking
2
- VERSION = "0.1.30"
2
+ VERSION = "0.1.31"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: api_banking
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.30
4
+ version: 0.1.31
5
5
  platform: ruby
6
6
  authors:
7
7
  - akil