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_8 (already cloned)
- Base commit: 9045eb5b65c21ee0c9746ee591b5f00bbce3b890
- Task ID: juspay__hyperswitch-8262
- Version: v1.114.0
TASK DESCRIPTION: Bug: feat(core): consume card details from billing connectors and first error codes and store them in payment intent table
Consume the card network and card iin from billing connectors and add them ton payment intent feature metadata
DETAILED CONTEXT & HINTS:
Type of Change
- Bugfix
- New feature
- Enhancement
- Refactoring
- Dependency updates
- Documentation
- CI/CD
Description
The following details are needed to be stored in the payment intent feature metadata as a part of transaction monitoring system for revenue recovery.
- Card Network
- Card Issuer
- First Payment Gateway Error Code
- First Network Error Code
- First Network Advice Code
These will be constant through out the lifecycle of the payment intent in revenue recovery system. We need to use these parameters further in revenue recovery system. We need this as training data and need these while Deciding optimal time for the retry.
These information is stored in payment intent because this information will be constant throughout for payment intent and this information cannot be populated every time we retry this payment.
Additional Changes
- This PR modifies the API contract
- This PR modifies the database schema
- This PR modifies application configuration/environment variables
Motivation and Context
How did you test it?
Can be tested by following the steps mentioned in this PR: #7461. Here are the test results:
Assistant
I'll help you implement this feature to consume card details from billing connectors and store them in payment intent table. Let me start by creating a structured plan for this task.
Assistant
I'll start by exploring the codebase to understand how payment intents and feature metadata are currently structured, and where we need to make changes to add the card network and card iin details from billing connectors.
First, let me examine the payment intent structure and feature metadata:
Assistant
Let me search more broadly for payment-related files:
Assistant
Let me look at the crates directory structure to better understand the codebase:
Assistant
Let me check the directory structure properly:
Assistant
Now let me look at the crates directory to find payment-related code:
Assistant
Let me examine the router crate since that's likely where payment intent logic resides:
Assistant
Let me look for payment intent related files more specifically:
Assistant
Let me look for feature metadata related code:
Assistant
Now let me check the payment intent creation and update operations more closely. Let's look at the API models to understand the structure:
Assistant
(no content)
Assistant
Let me search for payment intent related structs in the API models:
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.