mp_api 0.3.9 → 0.3.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mp_api/payment_error.rb +3 -2
- data/lib/mp_api/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e54d28e5a1b179d4711e51aa269bfae4e46c928e059771cd9cc599ad2a4b16df
|
4
|
+
data.tar.gz: 0d87f7a4c37a431a39f0c3916256cce2e3cd465f569e325c119708626a1802d1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7fbea8df281e4b274785c3e98ee91581ca254cda270dcb6f00a3ff75d8f559c9bf03f849ee4d87354118c14d7e02575b7d0bfdf624ee98edb5fa21bf2f1891d4
|
7
|
+
data.tar.gz: 8e6cd4d15c1a1e96d425651811516f6f7f42533caa3c23479212b9f902dbd0b86ac2e263c5b7e3e3cc9f3a558729c2ed01a65b2d7a91131bd38be2cf36e7b4a3
|
data/lib/mp_api/payment_error.rb
CHANGED
@@ -22,7 +22,7 @@ module MpApi
|
|
22
22
|
end
|
23
23
|
|
24
24
|
def failed_payment_error
|
25
|
-
message_by_error_message(json_response
|
25
|
+
message_by_error_message(json_response.dig("cause", 0, "description"))
|
26
26
|
end
|
27
27
|
|
28
28
|
def message_by_status_detail(status_detail)
|
@@ -38,7 +38,8 @@ module MpApi
|
|
38
38
|
|
39
39
|
def message_by_error_message(error_message)
|
40
40
|
{
|
41
|
-
"Invalid user identification number" => "CPF inválido."
|
41
|
+
"Invalid user identification number" => "CPF inválido.",
|
42
|
+
"payer.email must be a valid email" => "E-mail inválido."
|
42
43
|
# "Payer email forbidden" => "E-mail inválido.", Caso do erro no email test_user_2147198029@testuser.com (Nao sei se da pra causar com email valido)
|
43
44
|
}[error_message]
|
44
45
|
end
|
data/lib/mp_api/version.rb
CHANGED