You are working on the hyperswitch repository (Rust payment processing system).…
- User
You are working on the hyperswitch repository (Rust payment processing system).
REPOSITORY SETUP:
- Repository: juspay/hyperswitch
- Working directory: ./repos/hyperswitch_pool_5 (already cloned)
- Base commit: 0e957854372f1e6a81ce72234b8a4fda16cb4b8d
- Task ID: juspay__hyperswitch-8908
- Version: v1.116.0
TASK DESCRIPTION: Bug: [BUG] (connector): [Netcetera] Fix struct fields for Netcetera Authentication Response
Bug Description
current structure
NetceteraAuthenticationSuccessResponse{ .... pub challenge_cancel: Option, pub trans_status_reason: Option, pub message_extension: Option<Vec>, }
Correct structure
NetceteraAuthenticationSuccessResponse{ .... authentication_response: { pub trans_status_reason: Option, }, authentication_request: { pub message_extension: Option, } }
Expected Behavior
When the struct is fixed in code, the expected behavior is to:
Receive message_extension and trans_status_reason fields in Netcetera’s authentication response and store them in the authentication table.
Receive the challenge_cancel field from the Netcetera notification payload and store it in the authentication table.
Actual Behavior
Currently expected behaviour is not happening and mentioned fields are not getting stored in authentication table.
Steps To Reproduce
Provide an unambiguous set of steps to reproduce this bug. Include code or configuration to reproduce, if relevant.
- Go to '...'
- Click on '....'
- Scroll down to '....'
Context For The Bug
No response
Environment
Are you using hyperswitch hosted version? Yes/No If yes, please provide the value of the
x-request-idresponse header to help us debug your issue.If not (or if building/running locally), please provide the following details:
- Operating System or Linux distribution:
- Rust version (output of
rustc --version): `` - App version (output of
cargo r --features vergen -- --version): ``
Have you spent some time checking if this bug has been raised before?
- I checked and didn't find a similar issue
Have you read the Contributing Guidelines?
- I have read the
Assistant
I'll help you fix the Netcetera Authentication Response struct fields. Let me start by understanding the current implementation and then make the necessary changes.
First, let me search for the Netcetera authentication response structures to understand the current implementation:
Assistant
Now let me look at the netcetera types file to understand the current struct definitions:
Assistant
Let me also check for the specific authentication response types in the netcetera connector file:
Assistant
Let me look at the transformers file to understand the authentication response structures better:
Assistant
Now let me look at how the ResultsResponseData is used in the incoming webhook handling to understand the expected structure better:
Assistant
Let me now analyze the exact structure needed for the fix. Looking at the issue description, I need to:
- Remove
challenge_cancelfield fromNetceteraAuthenticationSuccessResponse - Move
trans_status_reasoninsideAuthenticationResponsestruct - Move
message_extensioninsideAuthenticationRequeststruct - Remove fields
challenge_cancelandchallenge_code_reasonfromResultsResponseData - Consume
challenge_cancelandchallenge_code_reasonfrom webhook'sresults_requestfield
Let me first check the webhook handler to understand how it consumes the fields:
- Remove
Assistant
Now I understand the structure better. Let me make the necessary changes to fix the Netcetera authentication response structure.
First, I'll update the
NetceteraAuthenticationSuccessResponsestruct in thetransformers.rsfile:Assistant
I need to read the file first before making changes. Let me continue with a different approach.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.