Skip to content

Commit

Permalink
Add transaction decline reason 'Authentication rejected by cardholder' (
Browse files Browse the repository at this point in the history
  • Loading branch information
BreD1810 authored Mar 24, 2022
1 parent 018d8ef commit 77b837f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/endpoints/transactions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ pub enum DeclineReason {
/// Requires SCA
StrongCustomerAuthenticationRequired,

/// Transaction declined by the cardholder
AuthenticationRejectedByCardholder,

/// All other errors
Other,
}
Expand Down Expand Up @@ -348,6 +351,12 @@ mod tests {
"##;

serde_json::from_str::<Transaction>(raw).expect("couldn't decode Transaction from json");

let new = raw.replace(
"SCA_NOT_AUTHENTICATED_CARD_NOT_PRESENT",
"AUTHENTICATION_REJECTED_BY_CARDHOLDER",
);
serde_json::from_str::<Transaction>(&new).expect("couldn't decode Transaction from json");
}

#[test]
Expand Down

0 comments on commit 77b837f

Please # to comment.