Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Support payment failure codes 124, 125, 126, 127, 128 and 134 #33

Merged
merged 15 commits into from
May 15, 2024

Conversation

Kwok-he-Chu
Copy link
Contributor

@Kwok-he-Chu Kwok-he-Chu commented May 13, 2024

  • Added support for payment failure codes: 124, 125, 126, 127, 128 and 134
  • When invalid json-requests are sent to the application, return a "Invalid JsonObject" Notification response
  • Payloads are updated accordingly
  • Updated README
  • Allow application to load request-response pairs when multiple *Requests and *Responses can be found in one directory
  • Tests are written to test these cases

Taken from: https://docs.adyen.com/point-of-sale/testing-pos-payments/test-card-v2/#testing-declines

Amount ending in Result ErrorCondition refusalReason message
124 Failure Refusal 210 Not enough balance NOT_ENOUGH_BALANCE
125 Failure Refusal 199 Card blocked BLOCK_CARD
126 Failure Refusal 228 Card expired CARD_EXPIRED
127 Failure Refusal 214 Declined online INVALID_AMOUNT
128 Failure InvalidCard 214 Declined online INVALID_CARD
134 Failure WrongPIN 129 Invalid online PIN INVALID_PIN
Remark: the terminal shows "Incorrect PIN" and then "Enter PIN". Cancel the payment on the terminal to get the failure response.

Updated README
Allow application to load request-response pairs when multiple *Requests and *Responses can be found in one directory
@Kwok-he-Chu Kwok-he-Chu requested a review from gcatanese May 14, 2024 09:32
@Kwok-he-Chu Kwok-he-Chu requested a review from ayodejidev May 14, 2024 10:34
@Kwok-he-Chu Kwok-he-Chu merged commit 8253f49 into main May 15, 2024
1 check passed
@Kwok-he-Chu Kwok-he-Chu deleted the add-support-to-handle-failure-requests branch May 15, 2024 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants