Document Status | IN PROGRESS |
---|---|
Document Owner(s) | |
Reviewers |
Context
Iberia proposes the inclusion of new error messages in the error detailing flow, following the established processes in stories:
Story: IBFEC-2647
Story: IBFEC-2856
The objective is to enhance error communication between the backend and frontend.
✅ Proposed Solution
To address these issues, we propose the creation of new error classes in the backend that will be sent to the frontend. This implementation will include specific error codes for different scenarios, such as payment cancellations, instead of using generic codes. This change will allow the frontend to display more informative and contextualized error messages, improving clarity and the overall user experience.
Backend
After the solution approval, will need to update the below documents with new classes, code errors, and any important things.
Paycomet errors: https://docs.paycomet.com/en/recursos/codigos-de-error
Iberia errors list: Sheet
Payment code errors: /wiki/spaces/RWLAPPwiki/pages/4858741214
Payment mappers: /wiki/spaces/RWLAPPwiki/pages/5001150489
Description errors
Created classes:
AuthSecurityError
ExternalError
FraudError
PspError
ExternalValidationError
Classes will be created:
InvalidAmountError
AuthenticationError
CardCountryNotAllowed
CardLimitExceededError
DeclinedCardError
CardTypeNotAllowedError
CardholderSecurePurchaseKeyError
ConfirmationDataNotValidError
CouldNotFindPreviousOperationError
DataExternalValidationError
DeclinedCardError
DuplicatedExternalReferenceError
ExpiredCardError
NoFundsCardError
OperationDeniedError
RefundNotPossibleError
ScaAuthenticationError
TimeOutConnectionError
ThreeDsChallengeFailedError
intl-packages
Rename the class:
From: OperationCancelledError
To: OperationCancelledFailedError
Will be created new classes in the path:
intl-packages/packages/psp-base/src/errors/psp-error-2/
Export the classes:
path:
intl-packages/packages/psp-base/src/errors/psp-error-2/index.ts
Will create the new error codes:
path:
intl-packages/packages/psp-base/src/errors/psp-error-2/psp-error-2.ts
Code Errors:
intl-psp-paycomet-service
We will need to map the error code:
path:
intl-psp-paycomet-service/src/errors/paycomet-error-map.ts
Check the possibility of mapping errors where classes have already been created.
e.g.:
Error Messages
Paycomet | Key | Description | Modal Title | Modal Message | Modal CTA | Screen |
---|---|---|---|---|---|---|
100 |
| Expired Card - | “Expired Card” | “Your card has expired. Please change your payment method in order to complete the transaction.” | “Change Payment Method” | |
105 |
| Insufficient Credit to make charge - Represents an error when the card does not have enough funds in order to perform the payment | “Payment Failed” | “Your payment couldn't be processed due to an issue with your payment method. Please review your payment method or choose a different one to complete your purchase.” | “Change Payment Method” | |
127 |
| Invalid Parameter - Represents an error when there is an invalid parameter | “Payment Failed" | “Something went wrong with this payment. Please try again later." | "Go Back and Try Again Later” | |
137 |
| Invalid Card - Represents an error when the card declined for various reasons | “Invalid Card” | “You card was declined by the issuer. Please, change your payment method and try again.” | “Change Payment Method” | |
141 |
| Zero or Invalid Quantity - Represents an error when the amount is zero or not valid | “Payment Failed” | “Something went wrong with this payment. Please try again.” | “Go Back and Try Again” | |
142 | ? | Operation Cancelled | “Operation Cancelled” | “This transaction has been cancelled. Please go back and try again.” | “Go Back and Try Again” | |
143 |
| Authentication error - Represents errors related to security and authentication within the payment system. | “Authentication Error” | “Something went wrong with this payment. Please try again.” | “Go Back and Try Again” | |
195 |
| Requires SCA Authentication - Represents an error a Strong Customer Authentication error. SCA (Strong Customer Authentication) is a requirement of the European directive PSD2 (Revised Payment Services Directive) aimed at enhancing the security of online financial transactions | “Payment Declined" | “Your payment has been declined. A multi-factor authentication is required by the issuer of your payment method in order to proceed.” | “Go Back” | |
500 |
| Unexpected Error - General, unspecified payment error. | “Payment Failed” | “Something went wrong with this payment. Please try again later.” | “Go Back and Try Again Later” | |
506 |
| Invalid Confirmation Data - Represents an error when confirmation data is not valid | “Invalid Confirmation Data” | “It seems the system could not validate the data entered. Please go back and try again.” | “Go Back and Try Again” | |
510 |
| Return is not possible - Represents an error when the refund is not possible | “Payment Timed Out” | “Something went wrong with this payment. Please try again.” | “Go Back and Try Again” | |
535 |
| General, unspecified payment error. | “Payment Failed” | “Something went wrong with this payment. Please try again later.” | “Go Back and Try Again” | |
549 |
| General, unspecified payment error. | “Payment Failed” | “Something went wrong with this payment. Please try again later.” | “Go Back and Try Again” | |
569 |
| Operation Rejected (Denied by the issuer) - Represents an error when the operation cannot be performed | “Payment Declined” | “Your payment was declined by your card issuer. Please select another payment method in order to proceed.” | "Change Payment Method” | |
1019 |
| Request Timed Out - Represents an error when there is a timeout | “Request Timed Out” | “Looks like the server is taking to long to respond, please try again.” | “Go Back and Try Again” | |
1026 |
| Duplicate external reference - Represents an error when there is a duplicated external reference | “Duplicated Payment” | “Duplicate transaction detected. It seems this payment has already been processed. Please check your order history or try again in a moment.” | “Go Back and Try Again” | |
1038 |
| Incorrect DS_MERCHANT_AMOUNT field - Represents an error when the field DS_MERCHANT_AMOUNT is incorrect | “Payment Failed” | “Something went wrong with this payment. Please go back and try again.” | “Go Back and Try Again” | |
1099 |
| Unexpected error (Error when processing the transaction) - General, unspecified payment error | “Unexpected error" | “Something went wrong with this payment. Please try again later.” | "Review Card Details” | |
1186 |
| Maximum limit per transaction not allowed (Default 1000 Euros) - Represents an error when the card amount/number of transaction limit has been exceeded | “Payment Declined" | “ Your payment was declined due to security reasons. Please review your order and try again.” | "Go Back” | |
1194 |
| Card Brand not allowed - Represents an error when the card type (type/brand/etc.) is not allowed for this transaction | “Payment Failed” | “It seems the card brand you're using is not supported. Please return and select a different payment method to complete your transaction.” | “Change Payment Method” | |
1254 |
| Attempt to process a secure payment, and the card does not allow it. - Represents an error when there is a commerce with secure cardholder and cardholder without secure purchase key | “Payment Failed” | “The payment couldn’t be processed because your card doesn’t support secure authentication methods. Please go back and try another payment method.” | “Change Payment Method” | |
1326 |
| Represents errors generated when a transaction is suspected of being fraudulent. This class extends `ExternalError` to encapsulate fraud-related issues, including abnormal user behavior, suspicious transaction patterns, and other indicators of potential fraud. It is designed to aid in the identification and management of transactions that may pose a risk to the payment system | “Payment Declined” | “Your payment was declined due to security reasons. Please select a new payment method and try again.” | "Change Payment Method” | |
1327 |
| Denied by security reasons - Represents an error when the 3DS Challenge failed | “Payment Declined" | “Your payment was declined due to security reasons. Please select a new payment method and try again.” | "Change Payment Method” | |
1417 |
| PayPal - The instrument presented has been declined. Please select another one. - Represents an error when the card declined for various reasons | “Payment Declined” | “Your payment was declined by Paypal. Please review your payment method or select a new one.” | “Go Back” | |
1425 |
| Paypal - Operation Canceled by the user | “Transaction Cancelled" | “Your transaction was canceled on PayPal. If you wish to complete your purchase, please try again or choose a different payment method” | "Go Back” |
Out-of-scope
It is out of the scope to create the Lokalise key, since the key can be added directly to the Lokalise portal.
For help, there is a list of keys that can be created in the Lokalise portal in the description error table (Lokalise key column).
Potential Challenges
N/A
💰 Cost
Describe any additional cost this solution may imply.
🎛️ Configuration
For this feature work, need to enable this feature flag: enable-rbi-error-2
📈 Metrics
Measure the number of cancellations made by the user.
🗓️ Delivery Plan
Link to the task or list of all the tasks required to deliver the solution, along with its progress.
🧑🚒 QA Plan
N/A
⚠️ Call-outs
Tip: Document here any improvement or discussion regarding the feature
Add Comment