better-mundipagg 0.1.2 → 0.1.3

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: 1ff3bc42d93061f3e9408ac8300d4221528b5661
4
- data.tar.gz: f8b66c8b3db325ce379761aa46129226a675e253
3
+ metadata.gz: d600948fbf6aea445bdc97e6c778121c6a801f67
4
+ data.tar.gz: 919e6719c2ee7a5afb70dce46f673f63449c45f2
5
5
  SHA512:
6
- metadata.gz: 1a8dc5e487cd6cdc2c50b4ef98b5986a43bd49f442e59b100e7a4f44950dc808573d73bd3dfec1e1f3d7df7e2f2a14a63e1858ea558e49c33a0761c342bb30b9
7
- data.tar.gz: 1ddeb98fd34dc0adac1abfb547802150ca22ab393d6d0f6e312cc29cc7633f331f7fb5f8c671aabab6ab9c553954553ee16264beaa1f58ce6a0046381d1c78dc
6
+ metadata.gz: d90d23b1bb909f8df283fb9bb5c243cc287b202c6f66d23c43be7104f3d71fbc82ce6cf2194e02b509253a94c7a3352994b7438be2aabbad3e7d7d2c8d79c566
7
+ data.tar.gz: 14189e71b5256f141fdfcb19fca2d7109354a220c4d10d4268cb6fa71037c5277d986111f3280d3894ceaeba8f9c74324c0d2bbf6b9b5a1573a2a63efcdce583
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- better-mundipagg (0.1.2)
4
+ better-mundipagg (0.1.3)
5
5
  activemerchant
6
6
  activemodel
7
7
  savon
@@ -9,25 +9,19 @@ PATH
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- active_utils (2.2.3)
13
- activesupport (>= 2.3.11)
14
- i18n
15
- activemerchant (1.45.0)
16
- active_utils (~> 2.2.0)
12
+ activemerchant (1.47.0)
17
13
  activesupport (>= 3.2.14, < 5.0.0)
18
14
  builder (>= 2.1.2, < 4.0.0)
19
15
  i18n (>= 0.6.9)
20
- json (~> 1.7)
21
16
  nokogiri (~> 1.4)
22
- offsite_payments (~> 2.0.0)
23
- activemodel (4.1.8)
24
- activesupport (= 4.1.8)
17
+ activemodel (4.2.0)
18
+ activesupport (= 4.2.0)
25
19
  builder (~> 3.1)
26
- activesupport (4.1.8)
27
- i18n (~> 0.6, >= 0.6.9)
20
+ activesupport (4.2.0)
21
+ i18n (~> 0.7)
28
22
  json (~> 1.7, >= 1.7.7)
29
23
  minitest (~> 5.1)
30
- thread_safe (~> 0.1)
24
+ thread_safe (~> 0.3, >= 0.3.4)
31
25
  tzinfo (~> 1.1)
32
26
  addressable (2.3.6)
33
27
  akami (1.2.2)
@@ -42,28 +36,17 @@ GEM
42
36
  builder (>= 2.1.2)
43
37
  httpi (2.3.0)
44
38
  rack
45
- i18n (0.6.11)
46
- json (1.8.1)
39
+ i18n (0.7.0)
40
+ json (1.8.2)
47
41
  macaddr (1.7.1)
48
42
  systemu (~> 2.6.2)
49
- mime-types (1.25.1)
50
- mini_portile (0.6.1)
51
- minitest (5.5.0)
52
- money (6.4.0)
53
- i18n (>= 0.6.4, <= 0.7.0.beta1)
43
+ mini_portile (0.6.2)
44
+ minitest (5.5.1)
54
45
  multi_json (1.10.1)
55
- nokogiri (1.6.5)
46
+ nokogiri (1.6.6.2)
56
47
  mini_portile (~> 0.6.0)
57
48
  nori (2.4.0)
58
- offsite_payments (2.0.1)
59
- active_utils (~> 2.2.0)
60
- activesupport (>= 3.2.14, < 5.0.0)
61
- builder (>= 2.1.2, < 4.0.0)
62
- i18n (~> 0.5)
63
- json (~> 1.7)
64
- money (< 7.0.0)
65
- nokogiri (~> 1.4)
66
- rack (1.5.2)
49
+ rack (1.6.0)
67
50
  rspec (3.1.0)
68
51
  rspec-core (~> 3.1.0)
69
52
  rspec-expectations (~> 3.1.0)
@@ -77,7 +60,7 @@ GEM
77
60
  rspec-support (~> 3.1.0)
78
61
  rspec-support (3.1.2)
79
62
  safe_yaml (1.0.4)
80
- savon (2.8.0)
63
+ savon (2.10.0)
81
64
  akami (~> 1.2)
82
65
  builder (>= 2.1.2)
83
66
  gyoku (~> 1.2)
@@ -85,7 +68,7 @@ GEM
85
68
  nokogiri (>= 1.4.0)
86
69
  nori (~> 2.4)
87
70
  uuid (~> 2.3.7)
88
- wasabi (= 3.3.0)
71
+ wasabi (~> 3.4)
89
72
  simplecov (0.9.1)
90
73
  docile (~> 1.1.0)
91
74
  multi_json (~> 1.0)
@@ -98,10 +81,9 @@ GEM
98
81
  uuid (2.3.7)
99
82
  macaddr (~> 1.0)
100
83
  vcr (2.9.3)
101
- wasabi (3.3.0)
84
+ wasabi (3.4.0)
102
85
  httpi (~> 2.0)
103
- mime-types (< 2.0.0)
104
- nokogiri (>= 1.4.0)
86
+ nokogiri (>= 1.4.2)
105
87
  webmock (1.20.4)
106
88
  addressable (>= 2.3.6)
107
89
  crack (>= 0.3.2)
@@ -43,8 +43,8 @@ module Mundipagg
43
43
 
44
44
  def error_item
45
45
  {
46
- description: payload[:acquirer_message].split("|").last,
47
- error_code: payload[:acquirer_return_code]
46
+ description: payload[:credit_card_transaction_result_collection][:credit_card_transaction_result][:acquirer_message].split("|").last,
47
+ error_code: payload[:credit_card_transaction_result_collection][:credit_card_transaction_result][:acquirer_return_code]
48
48
  }
49
49
  end
50
50
  end
@@ -21,10 +21,10 @@ module Mundipagg
21
21
  response = object.class::Response.new(result.body)
22
22
 
23
23
  params = { body: result.body }
24
- options = {}
25
24
 
26
25
  if response.success?
27
26
  message = "Ok"
27
+ options = {}
28
28
  else
29
29
  message = response.error.message
30
30
  options = { error_code: response.error.code }
@@ -7,11 +7,9 @@ module Mundipagg
7
7
  end
8
8
 
9
9
  def translate
10
- @hash.inject(Hash.new) do |hash, (key, value)|
10
+ @hash.each_with_object(Hash.new) do |(key, value), hash|
11
11
  key = Mundipagg::Key.new(key).to_s
12
-
13
12
  hash[key] = value.is_a?(Hash) ? self.class.new(value).translate : value
14
- hash
15
13
  end
16
14
  end
17
15
  end
@@ -12,8 +12,6 @@ module Mundipagg
12
12
  payload[:success]
13
13
  end
14
14
 
15
- alias :valid? :success?
16
-
17
15
  def error
18
16
  ::Mundipagg::Error.new error_item[:description], error_item[:error_code]
19
17
  rescue NoMethodError
@@ -1,3 +1,3 @@
1
1
  module Mundipagg
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: better-mundipagg
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bruno Azisaka
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-06 00:00:00.000000000 Z
11
+ date: 2015-03-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec