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_9 (already cloned)
- Base commit: 7b3c33c81c8f896847a3a0bb0ead90a6a67f8e61
- Task ID: juspay__hyperswitch-7872
- Version: v1.113.0
TASK DESCRIPTION: Bug: [FEATURE] (connector): [GETNET,HIPAY,KLARNA,MONERIS,OPENNODE] add in feature matrix api
Feature Description
[GETNET,HIPAY,KLARNA,MONERIS,OPENNODE] add in feature matrix api
Possible Implementation
[GETNET,HIPAY,KLARNA,MONERIS,OPENNODE] add in feature matrix api
Have you spent some time checking if this feature request has been raised before?
- I checked and didn't find a similar issue
Have you read the Contributing Guidelines?
- I have read the Contributing Guidelines
Are you willing to submit a PR?
Yes, I am willing to submit a PR!
DETAILED CONTEXT & HINTS:
Type of Change
- Bugfix
- New feature
- Enhancement
- Refactoring
- Dependency updates
- Documentation
- CI/CD
Closes this issue
Description
Added Getnet, Hipay, Klarna, Moneris, Opennode in feature matrix API
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?
Postman Tests
Request:
curl --location 'http://localhost:8080/feature_matrix' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header '[api-key]'Response:
{ "connector_count": 5, "connectors": [ { "name": "GETNET", "display_name": "Getnet", "description": "Getnet is a high-tech global payment platform that helps businesses accept payments securely while providing the best frictionless experience for customers everywhere.", "category": "payment_gateway", "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", "sequential_automatic" ], "three_ds": "not_supported", "no_three_ds": "supported", "supported_card_networks": [ "Mastercard", "Visa", "Interac", "AmericanExpress", "JCB", "DinersClub", "Discover", "CartesBancaires", "UnionPay", "RuPay", "Maestro" ], "supported_countries": [ "FIN", "BEL", "SWE", "IRL", "ESP", "NLD", "ARG", "NOR", "ARE", "POL", "MEX", "BRA", "ITA", "GBR", "CHE", "AUT", "DNK", "IND", "PRT", "CHL", "URY", "LUX", "FRA", "DEU" ], "supported_currencies": [ "ARS", "UYU", "EUR", "SEK", "NOK", "CHF", "INR", "AED", "MXN", "PLN", "DKK", "CLP", "BRL", "GBP" ] } ], "supported_webhook_flows": [ "payments", "refunds" ] }, { "name": "HIPAY", "display_name": "Hipay", "description": "HiPay is an independent global payment service provider that is based in France.", "category": "payment_gateway", "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", "sequential_automatic" ], "three_ds": "supported", "no_three_ds": "supported", "supported_card_networks": [ "Mastercard", "Visa", "Interac", "AmericanExpress", "JCB", "DinersClub", "Discover", "CartesBancaires", "UnionPay" ], "supported_countries": [ "ZAF", "SWE", "CAN", "JPN", "HKG", "NOR", "CZE", "POL", "DNK", "USA", "GBR", "AUS", "CHE" ], "supported_currencies": [ "EUR", "GBP", "NOK", "HKD", "AUD", "ZAR", "CHF", "SEK", "DKK", "PLN", "CZK", "USD", "CAD", "JPY" ] }, { "payment_method": "card", "payment_method_type": "debit", "payment_method_type_display_name": "Debit Card", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic" ], "three_ds": "supported", "no_three_ds": "supported", "supported_card_networks": [ "Mastercard", "Visa", "Interac", "AmericanExpress", "JCB", "DinersClub", "Discover", "CartesBancaires", "UnionPay" ], "supported_countries": [ "AUS", "USA", "CAN", "CZE", "POL", "SWE", "GBR", "NOR", "ZAF", "DNK", "CHE", "JPN", "HKG" ], "supported_currencies": [ "HKD", "DKK", "SEK", "PLN", "GBP", "CAD", "CZK", "JPY", "USD", "EUR", "AUD", "NOK", "CHF", "ZAR" ] } ], "supported_webhook_flows": [] }, { "name": "KLARNA", "display_name": "Klarna", "description": "Klarna provides payment processing services for the e-commerce industry, managing store claims and customer payments.", "category": "payment_gateway", "supported_payment_methods": [ { "payment_method": "pay_later", "payment_method_type": "klarna", "payment_method_type_display_name": "Klarna", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic" ], "supported_countries": [ "GRC", "PRT", "ESP", "CHE", "SWE", "CZE", "IRL", "FIN", "USA", "GBR", "NZL", "POL", "DNK", "NLD", "BEL", "NOR", "CAN", "AUS", "ITA", "DEU", "FRA", "AUT" ], "supported_currencies": [ "PLN", "CZK", "NOK", "CHF", "CAD", "AUD", "NZD", "DKK", "GBP", "SEK", "EUR", "USD" ] } ], "supported_webhook_flows": [] }, { "name": "MONERIS", "display_name": "Moneris", "description": "Moneris is Canada's top payment solutions provider, empowering businesses with innovative mobile, online & in-store solutions.", "category": "payment_gateway", "supported_payment_methods": [ { "payment_method": "card", "payment_method_type": "credit", "payment_method_type_display_name": "Credit Card", "mandates": "supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual" ], "three_ds": "not_supported", "no_three_ds": "supported", "supported_card_networks": [ "Mastercard", "Visa", "Interac", "AmericanExpress", "JCB", "DinersClub", "Discover", "CartesBancaires", "UnionPay" ], "supported_countries": [ "VUT", "SGP", "HUN", "DOM", "TUN", "LAO", "THA", "WSM", "PRY", "SLV", "BDI", "SVN", "KAZ", "TZA", "ESP", "TUR", "SLE", "BLZ", "MDA", "SWE", "BMU", "AGO", "ISR", "PRT", "BGR", "KWT", "DEU", "JOR", "SYC", "MRT", "BGD", "IDN", "CHL", "LUX", "GRC", "RWA", "VNM", "BIH", "SHN", "UGA", "HRV", "SRB", "CHE", "MDV", "FIN", "PER", "KEN", "BTN", "GIN", "ROU", "NIC", "KOR", "NAM", "COM", "CUB", "LVA", "DJI", "ZAF", "SLB", "ARE", "AUT", "MDG", "ITA", "GBR", "SAU", "LKA", "BHR", "RUS", "ZMB", "BRB", "NZL", "LSO", "MAC", "LBR", "HND", "PNG", "PAK", "USA", "GTM", "TKM", "AZE", "CRI", "POL", "BEL", "TJK", "AUS", "BRA", "UZB", "QAT", "EGY", "MWI", "CYM", "NOR", "ALB", "AFG", "DZA", "MEX", "DNK", "HKG", "MYS", "GUY", "FRA", "SWZ", "BLR", "JPN", "BRN", "NGA", "IND", "SVK", "LTU", "TWN", "MAR", "JAM", "BOL", "CZE", "EST", "TTO", "CYP", "COL", "ISL", "IRL", "GEO", "URY", "ABW", "MLT", "MKD", "GIB", "FJI", "CHN", "NLD", "OMN", "HTI", "NPL", "SUR", "GMB", "CPV", "ARG", "MOZ", "MUS" ], "supported_currencies": [ "PGK", "ZAR", "LSL", "MGA", "MWK", "AZN", "BIF", "NGN", "NIO", "JOD", "KWD", "NOK", "MYR", "HUF", "NAD", "AFN", "SBD", "INR", "BBD", "GTQ", "RUB", "GMD", "WST", "ALL", "MXN", "RON", "BYN", "MAD", "OMR", "HRK", "BAM", "HTG", "RSD", "BDT", "TMT", "CHF", "AUD", "AWG", "AED", "TTD", "QAR", "BND", "SEK", "TND", "DZD", "RWF", "BOB", "JMD", "XPF", "NZD", "VUV", "UZS", "PYG", "ARS", "TJS", "AOA", "MOP", "UGX", "DOP", "SLL", "BRL", "KYD", "THB", "FJD", "BZD", "KMF", "MKD", "UYU", "XOF", "DKK", "PHP", "SHP", "SGD", "BTN", "MUR", "SCR", "XCD", "ZMW", "JPY", "PEN", "ANG", "HKD", "KES", "LAK", "SZL", "CRC", "PLN", "CNY", "SVC", "IDR", "MDL", "USD", "VND", "BMD", "DJF", "GEL", "KRW", "KZT", "NPR", "PKR", "CUP", "MRU", "CZK", "ILS", "GYD", "LKR", "LRD", "BGN", "GIP", "TZS", "EUR", "GBP", "MZN", "BHD", "MVR", "SAR", "TWD", "COP", "GNF", "SRD", "TRY", "HNL", "EGP", "ISK", "CLP", "CVE" ] }, { "payment_method": "card", "payment_method_type": "debit", "payment_method_type_display_name": "Debit Card", "mandates": "supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual" ], "three_ds": "not_supported", "no_three_ds": "supported", "supported_card_networks": [ "Mastercard", "Visa", "Interac", "AmericanExpress", "JCB", "DinersClub", "Discover", "CartesBancaires", "UnionPay" ], "supported_countries": [ "RWA", "MDV", "ISL", "FIN", "PRT", "COM", "USA", "UZB", "POL", "LAO", "SVK", "UGA", "BRN", "DOM", "MDA", "COL", "CRI", "BEL", "TKM", "KWT", "BGR", "MAR", "CHL", "SWE", "TWN", "JOR", "AUS", "MUS", "ARE", "KOR", "LUX", "SLV", "GRC", "URY", "LBR", "AUT", "HTI", "EST", "DEU", "ABW", "MAC", "MLT", "SLE", "OMN", "HND", "DJI", "AFG", "MYS", "THA", "SYC", "NIC", "GMB", "VUT", "PAK", "IND", "MOZ", "ROU", "JPN", "MKD", "ZAF", "BLR", "HKG", "LSO", "BDI", "PNG", "DNK", "EGY", "LKA", "ARG", "PRY", "BRA", "HRV", "JAM", "NOR", "IRL", "GIN", "BIH", "MEX", "BMU", "ITA", "WSM", "BRB", "BOL", "TJK", "FJI", "TUR", "NLD", "HUN", "CYP", "SAU", "ZMB", "ESP", "GEO", "RUS", "MDG", "DZA", "TTO", "AGO", "GTM", "SGP", "CYM", "GIB", "SVN", "FRA", "GUY", "MWI", "QAT", "LTU", "PER", "SWZ", "VNM", "LVA", "AZE", "BHR", "ISR", "CUB", "GBR", "BLZ", "CZE", "SLB", "MRT", "NGA", "BGD", "CHN", "SUR", "KEN", "ALB", "TUN", "SHN", "CHE", "BTN", "NZL", "KAZ", "NAM", "TZA", "CPV", "IDN", "SRB", "NPL" ], "supported_currencies": [ "DOP", "ISK", "AUD", "BMD", "SBD", "XOF", "AFN", "RWF", "PGK", "UZS", "HRK", "LAK", "BBD", "CVE", "MZN", "CLP", "MUR", "GBP", "BHD", "JPY", "ALL", "KMF", "NZD", "QAR", "BZD", "GYD", "TJS", "NIO", "LKR", "LRD", "MKD", "PKR", "XCD", "MXN", "TMT", "USD", "SHP", "VND", "NOK", "GIP", "MYR", "BYN", "KZT", "BAM", "BDT", "BGN", "EUR", "NPR", "PHP", "ZAR", "XPF", "SLL", "BND", "CRC", "JOD", "RON", "WST", "SZL", "GNF", "TWD", "KES", "MOP", "JMD", "TZS", "GTQ", "CZK", "INR", "SCR", "GMD", "TRY", "HTG", "NGN", "MDL", "OMR", "KYD", "SGD", "HNL", "AED", "AWG", "SRD", "VUV", "CNY", "THB", "RUB", "SEK", "CHF", "KWD", "BIF", "BOB", "PLN", "MGA", "SAR", "TND", "PYG", "SVC", "TTD", "UGX", "ANG", "DJF", "DKK", "EGP", "DZD", "ZMW", "BRL", "AOA", "AZN", "IDR", "FJD", "MWK", "MRU", "GEL", "ARS", "HUF", "ILS", "MVR", "UYU", "MAD", "HKD", "LSL", "PEN", "NAD", "CUP", "KRW", "COP", "BTN", "RSD" ] } ], "supported_webhook_flows": [] }, { "name": "OPENNODE", "display_name": "Opennode", "description": "OpenNode offers accessible way for e-commerce businesses to process bitcoin payments.", "category": "payment_gateway", "supported_payment_methods": [ { "payment_method": "crypto", "payment_method_type": "crypto_currency", "payment_method_type_display_name": "Crypto", "mandates": "not_supported", "refunds": "not_supported", "supported_capture_methods": [ "automatic" ], "supported_countries": [ "SVN", "PHL", "CAN", "AUS", "BEL", "MEX", "NLD", "FIN", "GBR", "MLT", "ESP", "USA", "EST", "PRT", "SVK", "JPN", "CYP", "LVA", "LTU", "ZAF", "BRA", "HRV", "DEU", "GRC", "ITA", "SGP", "FRA", "LUX", "IRL", "NZL", "AUT" ], "supported_currencies": [ "AUD", "JPY", "BRL", "CAD", "USD", "MXN", "PHP", "GBP", "EUR", "ZAR", "SGD", "NZD" ] } ], "supported_webhook_flows": [ "payments" ] } ] }Checklist
- I formatted the code
cargo +nightly fmt --all - I addressed lints thrown by
cargo clippy - I reviewed the submitted code
- I added unit tests for my changes where possible
CRITICAL INSTRUCTIONS - WORK FAST AND EFFICIENTLY:
-
Create DENSE, ACTION-FOCUSED todos IMMEDIATELY
- Make todos specific and actionable
- Focus on HIGH-IMPACT actions only
- 5-8 todos maximum - be surgical, not exhaustive
-
Execute aggressively:
- Use bash commands to search efficiently
- Read multiple related files in quick succession
- Make ALL related changes in one edit
- Skip unnecessary exploration
-
File operations:
- All repo files: './repos/hyperswitch_pool_9/'
- Use targeted edits over whole file rewrites
-
NO TESTING UNLESS CRITICAL:
- Focus on making the actual code changes
- Only test if explicitly required
-
Maximize information density:
- Each turn should accomplish significant work
- Batch file reads when examining related code
- Use search commands to locate code quickly
EFFICIENCY IS CRITICAL. Make substantial progress every turn.
Assistant
I'll help you implement the feature matrix API for the connectors GETNET, HIPAY, KLARNA, MONERIS, and OPENNODE. Let me start by understanding the current codebase structure and identifying where the feature matrix API is implemented.
Assistant
First, I'll explore the repository structure to understand how the feature matrix API is currently implemented and where I need to make changes.
Assistant
(no content)
Assistant
Now I need to look for existing connector implementations to understand how they're structured and where to add the new ones.
Assistant
(no content)
Assistant
Let me also check the API models for the feature matrix to understand the structure better:
Assistant
Let me now check if the connector enums already include these connectors, or if I need to add them:
Assistant
Great! I can see that the connectors GETNET, HIPAY, KLARNA, MONERIS, and OPENNODE are already defined in the
Connectorenum. Now I need to look for their implementations to understand how they work. Let me check the connector implementation directory:Assistant
(no content)
Assistant
Let me check what's in the hyperswitch_connectors directory:
Assistant
(no content)
Assistant
(no content)
Assistant
(no content)
Assistant
(no content)
Assistant
(no content)
Assistant
Perfect! I can see the connector implementations exist. Now let me check the specific implementations for the connectors mentioned in the task - GETNET, HIPAY, KLARNA, MONERIS, and OPENNODE. Let me first understand the problem better by looking at what the feature matrix should return.
Based on the issue description, the feature matrix API should include these five connectors: GETNET, HIPAY, KLARNA, MONERIS, and OPENNODE. Since these connectors are already defined in the
Connectorenum, they should already be available in the API.Looking at the
generate_feature_matrixfunction infeature_matrix.rs, I can see that it already supports all connectors defined in theConnectorenum by iterating throughConnector::iter(). The problem may be that these specific connectors don't have their configuration properly implemented to support the feature matrix functionality.Let me check if there's a specific implementation issue by looking at one of these connectors to understand the pattern.
Assistant
I can see that Getnet (and all other connectors) implement the
ConnectorSpecificationstrait on line 832. Let me look at this trait to understand what it provides for the feature matrix.Assistant
Perfect! I can see that the
ConnectorSpecificationstrait has three methods:get_supported_payment_methods()- returns Option<&'static SupportedPaymentMethods>get_supported_webhook_flows()- returns Option<&'static [EventClass]>get_connector_about()- returns Option<&'static ConnectorInfo>
Looking at line 832 of getnet.rs, it has
impl ConnectorSpecifications for Getnet {}which means it's just providing empty default implementations.This is the issue - these connectors don't have their specific feature information implemented. Let me check how this should be implemented by looking at an example of a connector that properly implements this trait.
Let me examine how one of the connectors that already has proper feature matrix data works:
Assistant
Let me check if there's a more complete example by looking for how a connector implements ConnectorSpecifications properly. Let me look at a simpler connector that probably has this implemented correctly.
Assistant
Let me look at one of these to see how they properly implement it:
Assistant
Let me search for the specific ConnectorSpecifications implementation in this connector:
Assistant
Perfect! I can see the pattern now. Let me also look for the static variables that hold these values:
Assistant
Great! Now I understand the pattern. Let me also look at how the ConnectorInfo is constructed:
Assistant
Now I understand exactly what I need to do. I need to implement the
ConnectorSpecificationstrait for the following connectors:- GETNET
- HIPAY
- KLARNA
- MONERIS
- OPENNODE
Each needs to have:
get_connector_about()returning a staticConnectorInfoget_supported_payment_methods()returning a staticSupportedPaymentMethodsget_supported_webhook_flows()returning a static vector ofEventClass
Looking at the example from the issue description, I can see what the expected data should be for each connector.
Let me update the todos and then proceed with implementing the feature for these 5 connectors.
Assistant
I'll implement the
ConnectorSpecificationstrait for each of the connectors that need to be added to the feature matrix API. Let me start with the GETNET connector:Assistant
Let me first read the file to make sure I have the right context before editing:
Assistant
Let me continue reading to find where to add the implementation:
Assistant
Perfect! Now I can see the implementation. Let me implement the
ConnectorSpecificationstrait for GETNET. Based on the example provided in the issue description, I need to add the static variables and implementation. I'll do this step by step for each connector.Assistant
I need to first read the complete file to understand the structure better and then make a targeted edit. Let me get a broader view of the file structure first:
Assistant
Let me first understand where to place the implementation. I'll read around the end of the file to find the right spot:
Assistant
Now I need to add the necessary imports and the ConnectorSpecifications implementation. I'll add them right before the
impl ConnectorSpecifications for Getnet {}line, but I also need to add the static variables. Let me check the imports at the top to see if I need to add any:
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Identical first prompt
claude-sonnet-4-5-20250929Compare side by side →
claude-sonnet-4-5-20250929Compare side by side →
claude-sonnet-4-5-20250929Compare side by side →
claude-sonnet-4-5-20250929Compare side by side →
claude-sonnet-4-5-20250929Compare side by side →
claude-sonnet-4-5-20250929Compare side by side →
claude-sonnet-4-5-20250929Compare side by side →
claude-sonnet-4-5-20250929Compare side by side →
claude-sonnet-4-5-20250929Compare side by side →
claude-sonnet-4-5-20250929Compare side by side →
claude-sonnet-4-5-20250929Compare side by side →
claude-sonnet-4-5-20250929Compare side by side →