mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-23 12:38:33 +00:00
Allow stripe error codes to be upgraded to decline codes.
This commit is contained in:
committed by
Cody Henthorne
parent
1a657a7a19
commit
123fb95916
@@ -194,10 +194,13 @@ class StripeApi(
|
||||
return response
|
||||
} else {
|
||||
val body = response.body()?.string()
|
||||
val errorCode = parseErrorCode(body)
|
||||
val declineCode = parseDeclineCode(body) ?: StripeDeclineCode.getFromCode(errorCode)
|
||||
|
||||
throw StripeError.PostError(
|
||||
response.code(),
|
||||
parseErrorCode(body),
|
||||
parseDeclineCode(body)
|
||||
errorCode,
|
||||
declineCode
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user