fintecture 0.1.1 → 0.1.2

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
  SHA256:
3
- metadata.gz: 1aabc689ef193e6c52a646aa429b0b4e92ca6726b7666f61c4b662fee1168286
4
- data.tar.gz: 68925fb0bb6efae8ef2ca421a6595c73399f46e38053805badf4a697e96109ad
3
+ metadata.gz: cc7cb2f525cc68f62282338bd42ea9192cdec355b8cae741af10c23d8a39707a
4
+ data.tar.gz: 996a01131a38654376f643a27a3320fcfdf6cb54a257ed02e5c6827bb03f993d
5
5
  SHA512:
6
- metadata.gz: 982511cfdb580c3ab88ee02a059778f72f1cce98b74c42166ffed8eabd94689663f6f85d1d4e0ca871fafb90eb267c4d80f8627dac7a9345866654a67cd68394
7
- data.tar.gz: 1ddd39474af05ca8e5f2c06f16b6d255789d7732dfa0cb56f04f5b220d9bdc44bedca49bbeb6059e6cc1a81469f61ff3859b89e90bfaf02fad90b9de86679909
6
+ metadata.gz: 81c99f6a60b75faff2d5b3c7d98d75df3078ad66089dcd2b07e81434291f05cc0abf6690bfbc667c61c9d8be5251afa59b8755552af05aa2304a896e3c4cf34d
7
+ data.tar.gz: 9d166f76394978c2baa9f3b3c187740c2b5449263f21a5b3ddc400b6d327b7c2b989a82e110142cdf6134d8680ca38e566f15daa2a898921ec643162bf2504b8
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fintecture (0.1.0)
4
+ fintecture (0.1.1)
5
5
  faraday
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -7,7 +7,7 @@ Fintecture is connected with most European banks and enables a user to initiate
7
7
  Add this line to your application's Gemfile:
8
8
 
9
9
  ```ruby
10
- gem 'fintecture', '~> 0.1.0'
10
+ gem 'fintecture'
11
11
  ```
12
12
 
13
13
  or install it through our github repository
data/lib/fintecture.rb CHANGED
@@ -29,7 +29,7 @@ module Fintecture
29
29
  @logger = nil
30
30
  @environment = 'sandbox'
31
31
 
32
- ENVIRONMENTS = %w[sandbox production].freeze
32
+ ENVIRONMENTS = %w[local sandbox production].freeze
33
33
 
34
34
  class << self
35
35
  attr_accessor :app_id, :app_secret, :app_private_key
@@ -77,4 +77,6 @@ module Fintecture
77
77
  end
78
78
 
79
79
  end
80
- end
80
+ end
81
+
82
+ Fintecture.log_level = ENV["FINTECTURE_LOG"] unless ENV["FINTECTURE_LOG"].nil?
@@ -78,7 +78,7 @@ module Fintecture
78
78
  }
79
79
 
80
80
  data = {
81
- type: 'SEPA',
81
+ type: 'PAYMENT',
82
82
  attributes: attributes,
83
83
  }
84
84
 
@@ -109,15 +109,15 @@ module Fintecture
109
109
  end
110
110
 
111
111
  def build_local_digest(parameters)
112
- test_string = Base64.strict_encode64({
113
- app_id: Fintecture.app_id,
114
- app_secret: Fintecture.app_secret,
115
- session_id: parameters[:session_id],
116
- status: parameters[:status],
117
- customer_id: parameters[:customer_id],
118
- provider: parameters[:provider],
119
- state: parameters[:state]
120
- }.to_json.to_s)
112
+ test_string = {
113
+ app_id: Fintecture.app_id,
114
+ app_secret: Fintecture.app_secret,
115
+ session_id: parameters['session_id'],
116
+ status: parameters['status'],
117
+ customer_id: parameters['customer_id'],
118
+ provider: parameters['provider'],
119
+ state: parameters['state']
120
+ }.map{|key, value| "#{key}=#{value}"}.join('&')
121
121
 
122
122
  Fintecture::Utils::Crypto.hash_base64 test_string
123
123
  end
@@ -39,7 +39,8 @@ module Fintecture
39
39
  end
40
40
 
41
41
  def hash_base64(plain_text)
42
- Base64.strict_encode64(Digest::SHA2.new(256).hexdigest(plain_text))
42
+ digest = Digest::SHA256.digest plain_text
43
+ Base64.strict_encode64(digest)
43
44
  end
44
45
 
45
46
  end
@@ -1,3 +1,3 @@
1
1
  module Fintecture
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fintecture
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fintecture
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-12-10 00:00:00.000000000 Z
11
+ date: 2019-12-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler