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: 713c85d25d29259672da6efbfed0862e843ec542
- Task ID: juspay__hyperswitch-8295
- Version: v1.114.0
TASK DESCRIPTION: Bug: add
merchant_category_codein business profileAdd support to accept
merchant_category_codeas input in the business profile. This is the four-digit code assigned based on business type to determine processing fees and risk level. This code can be used to make various decision during a payment flow. One such use case is network interchange fee calculation in debit routing.DETAILED CONTEXT & HINTS:
Type of Change
- Bugfix
- New feature
- Enhancement
- Refactoring
- Dependency updates
- Documentation
- CI/CD
Description
This pull request introduces
merchant_category_codefield in the business profile. This is the four-digit code assigned based on business type to determine processing fees and risk level. This code can be used to make various decision during a payment flow. One such use case is network interchange fee calculation in debit routing.- Enum Enhancements: Introduced two new enums,
MerchantCategoryandMerchantCategoryCode, to represent MCCs and their corresponding human-readable names. Implemented a mapping functionto_merchant_category_nameto convert MCCs to their names.
WASM Functionality
- Frontend Integration: Added a new WASM function
getMerchantCategoryCodeWithNameto retrieve all MCCs along with their names for frontend use. This function iterates over theMerchantCategoryCodeenum and constructs a list of MCCs and their human-readable names.
Code Refactoring
- Enum Renaming: Renamed
MerchantCategoryCodeto in specific contexts to clarify usage in decision engine logic. This is struct will be removed once the new struct is introduced in decision engine.
Assistant
I'll help you implement the merchant_category_code feature in the business profile. Let me start by creating a plan and exploring the relevant files.
Assistant
Let me first explore the business profile structure to understand where to add the merchant_category_code field.
Assistant
(no content)
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.