fix(connector): [Fiuu] populate error_code and error_desc for redirection flows if they're not present in PSync #8124
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Type of Change
Description
Fixed Fiuu connector to properly handle and return
error_code
anderror_message
for failed FPX transactions. The connector was previously receiving error information during redirection back to Hyperswitch but was not populating these fields in API responses after redirection back to Hyperswitch during Payment Sync (PSync) operations.Changes made:
Additional Changes
Motivation and Context
This change addresses a critical gap in error handling for FPX transactions through the Fiuu connector. Currently, when FPX transactions fail, the error details provided during redirection are not being captured and made available through the Hyperswitch API or webhooks. This makes it difficult for merchants to understand why transactions failed and provide appropriate feedback to their customers.
How did you test it?
Steps for testing -
1. Add Fiuu connector and enable FPX
cURL
2. Create a payment link with MYR currency
cURL
Response
4. Retrieve the payment - Response to have `error_code` and `error_message`
cURL
Response
Checklist
cargo +nightly fmt --all
cargo clippy