Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add transaction decline reason 'Authentication rejected by cardholder' #51

Merged
merged 1 commit into from
Mar 24, 2022

Conversation

BreD1810
Copy link
Contributor

Before this change, I was getting the following on a transaction:

Error: Serde(Error("unknown variant `AUTHENTICATION_REJECTED_BY_CARDHOLDER`, expected one of `INSUFFICIENT_FUNDS`, `CARD_INACTIVE`, `CARD_BLOCKED`, `INVALID_CVC`, `SCA_NOT_AUTHENTICATED_CARD_NOT_PRESENT`, `STRONG_CUSTOMER_AUTHENTICATION_REQUIRED`, `OTHER`", line: 1, column: 28437))

@BreD1810 BreD1810 force-pushed the rejected-decline-reason branch from 221ace7 to d2b14a2 Compare March 23, 2022 21:51
@codecov
Copy link

codecov bot commented Mar 23, 2022

Codecov Report

Merging #51 (d2b14a2) into main (018d8ef) will increase coverage by 0.36%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main      #51      +/-   ##
==========================================
+ Coverage   45.86%   46.22%   +0.36%     
==========================================
  Files          19       19              
  Lines         894      900       +6     
==========================================
+ Hits          410      416       +6     
  Misses        484      484              
Impacted Files Coverage Δ
src/endpoints/transactions.rs 99.46% <100.00%> (+<0.01%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 018d8ef...d2b14a2. Read the comment docs.

@danieleades
Copy link
Owner

thanks for this. changes look good.

I've been toying with the idea of adding a 'catch-all' enum variant for any unrecognised case, to prevent panicking. The tricky thing there is that there's already an Other case (which the API defines), so that might be slightly confusing.

@danieleades danieleades merged commit 77b837f into danieleades:main Mar 24, 2022
@github-actions github-actions bot mentioned this pull request Aug 23, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants