mundipagg_v1 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mundipagg_v1_sdk.rb +6 -7
- 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: 8fe0eacfbf545715ed90501c913d225e083b60e9
|
4
|
+
data.tar.gz: 9b0c1f997d85a553d60a58b7d69c60200d9e5268
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c34290a040e3dbddcf52b954d80ece0e54f3e2a743cc6efc2c956f64f8f2ff750b3cd31465f2f4fec2830dd84fa25d284d1a1fc6b4665a209107908785829148
|
7
|
+
data.tar.gz: 217c2f120de2f80370f4648f2adcb7539e62e1e4f373f2936d1e69f4553d00c05187e118bcb4a6a6b998056f91c8df1a9e5a0bac97a96f4be4c626e48607492c
|
data/lib/mundipagg_v1_sdk.rb
CHANGED
@@ -99,17 +99,16 @@ module MundipaggV1Sdk
|
|
99
99
|
def handle_validation_error_response(response)
|
100
100
|
|
101
101
|
if !response["last_transaction"].nil? && !response["last_transaction"]["gateway_response"].nil? && response["last_transaction"]["gateway_response"]["code"].to_i >= 400
|
102
|
-
|
102
|
+
err_response = response["last_transaction"]["gateway_response"]
|
103
|
+
puts JSON.pretty_generate(err_response["errors"]) unless err_response["errors"].nil?
|
104
|
+
raise(::Exception.new( err_response["errors"][0]["message"] ))
|
103
105
|
elsif !response["last_transaction"].nil? && response["last_transaction"]["success"] == false
|
104
|
-
|
106
|
+
err_response = response["last_transaction"]["acquirer_message"]
|
107
|
+
puts JSON.pretty_generate(err_response) unless err_response["errors"].nil?
|
108
|
+
raise(::Exception.new( err_response ))
|
105
109
|
else
|
106
110
|
return
|
107
111
|
end
|
108
|
-
|
109
|
-
# MundipaggV1Sdk::AuthenticationError.new
|
110
|
-
err_response = JSON.load(err)
|
111
|
-
puts JSON.pretty_generate(err_response[:errors]) unless err_response[:errors].nil?
|
112
|
-
raise(::Exception.new( err_response[:last_transaction][:gateway_response][:errors][0][:message] ))
|
113
112
|
end
|
114
113
|
|
115
114
|
end
|