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_0 (already cloned)
- Base commit: d42fad73f502933ecf50215503f0bea41813662c
- Task ID: juspay__hyperswitch-8698
- Version: v1.115.0
TASK DESCRIPTION: Bug: [BUG] FEATURE_MATRIX shows JPMorgan does not support Refunds
I added support for refunds 3 weeks ago in #8436. Feature matrix needs to be updated.
DETAILED CONTEXT & HINTS:
Type of Change
- Bugfix
- New feature
- Enhancement
- Refactoring
- Dependency updates
- Documentation
- CI/CD
Description
This PR marks refunds as supported by JPMorgan connector. Although this does not affect refund flow, the feature matrix marking is wrong.
Additional Changes
- This PR modifies the API contract
- This PR modifies the database schema
- This PR modifies application configuration/environment variables
Motivation and Context
I added refunds support 3 weeks ago in #8436 and this was missed. closes #8698
How did you test it?
Hit feature matrix endpoint:
curl --location 'http://localhost:8080/feature_matrix' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json'{ ... "supported_payment_methods": [ { "payment_method": "card", "payment_method_type": "credit", "payment_method_type_display_name": "Credit Card", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual" ], "three_ds": "not_supported", "no_three_ds": "supported", "supported_card_networks": [ "AmericanExpress", "DinersClub", "Discover", "JCB", "Mastercard", ... }, { "payment_method": "card", "payment_method_type": "debit", "payment_method_type_display_name": "Debit Card", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual" ], "three_ds": "not_supported", "no_three_ds": "supported", "supported_card_networks": [ "AmericanExpress", "DinersClub", "Discover", "JCB", "Mastercard", "UnionPay", "Visa" ], "supported_countries": [ "FRA", "BEL", ... } Assistant
I'll help you fix the bug where the FEATURE_MATRIX incorrectly shows that JPMorgan does not support Refunds. Let me start by creating a plan and then locate the relevant files.
Assistant
First, let me explore the codebase to understand the structure and find where the feature matrix is implemented and where JPMorgan connector configuration is defined.
Assistant
(no content)
Assistant
Now let me examine the feature matrix implementation to understand how it determines what features are supported by each connector:
Assistant
Now let me examine the JPMorgan connector implementation to see how it defines its supported features, particularly refunds:
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.