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_6 (already cloned)
- Base commit: 5730ddfc8893017f40a5f5a8c1b7f099cc0d22a9
- Task ID: juspay__hyperswitch-7748
- Version: v1.113.0
TASK DESCRIPTION: Bug: Add checks around Cypress mandates payments
Just verifying the payment method status isn't enough. We also need to verify the existence of connector mandate id. this can be done by updating the
mitusingpmidcommand.DETAILED CONTEXT & HINTS:
Type of Change
- Bugfix
- New feature
- Enhancement
- Refactoring
- Dependency updates
- Documentation
- CI/CD
Description
This PR adds a check to verify if the
payment_statusis not any ofsucceeded,partially_capturedorrequires_captureand if so, then theconnector_mandate_idshould benull.Additional Changes
- This PR modifies the API contract
- This PR modifies the database schema
- This PR modifies application configuration/environment variables
Motivation and Context
Verifying PM status isn't enough. We also need to check the existence of connector mandate id.
Closes #7748
How did you test it?
CI should pass.
Also:
CIT confirm, we should get
connector_mandate_idMIT confirm, in NTID flow,
connector_mandate_idwill benullChecklist
- I formatted the code
Assistant
I'll work on adding checks around Cypress mandates payments to verify the existence of connector mandate ID. Let me start by understanding the current implementation and locating the relevant files.
Assistant
I'll start by searching for files related to the
mitusingpmidcommand and mandate handling to understand the current implementation.Assistant
Let me search more broadly for mandate-related code and payment method status checking:
Assistant
Let me search for files related to mandate handling and payment methods:
Assistant
Let me look specifically at mandate-related files and payment confirmation logic:
Assistant
Let me also look at the payment confirm logic where the issue likely resides:
Assistant
Now let me check the helpers file to understand how mandate verification currently works:
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.