PR review: fix(ucs): Add missing mifinity config for HS↔UCS call (#13596)
- Dominant language
- Rust
- Stars
- 43.7k
- Forks
- 5.1k
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 210
Description
Relates to #13596
## PR Review: Mifinity UCS Config — Integ Verification Results
### PR Summary
Single-file change to `crates/router/src/core/unified_connector_service/connector_config.rs` (+31/-0), merged 2026-08-10 as `c684c18cd3dca`. Adds the missing Mifinity arm to the HS→UCS connector-config bridge:
- `MifinityMetadata` struct (line 85 on `origin/main`)
- `ConnectorSpecificConfig::Mifinity` enum variant (line 667)
- `Connector::Mifinity` transform arm (line 1718)
**Pre-PR behavior:** Any HS↔UCS call for Mifinity fell through to the catch-all `"not yet supported for ConnectorSpecificConfig"` arm and returned **500 InternalServerError** at config-build time — Mifinity was unreachable via the UCS path.
Merged code verified verbatim at `origin/main` HEAD (`199c5b7edd`).
### Environments Tested
- **Integration** (`https://integ.hyperswitch.io`) via runner
- Merchant: `merchant_1771912212` / Profile: `pro_LJKdh6PwKrz5DvKnzHZi`
- Mifinity MCA used: `mca_SPvg6Xd1qyrSp55lvRZK` (HeaderKey auth, metadata `brand_id` + `destination_account_number`)
### Test Results
| # | Check | Outcome | Evidence |
|---|-------|---------|----------|
| 1 | **Primary behavior:** Mifinity wallet create+confirm through HS→UCS no longer 500s at config build; expect `requires_customer_action` + `redirect_to_url` | **PASS** (live integ) | `pay_ntTJS2H8hIeytels6RUj` → status `requires_customer_action`, `connector=mifinity`, `next_action.redirect_to_url=https://integ.hyperswitch.io/api/payments/redirect/pay_ntTJS2H8hIeytels6RUj/merchant_1771912212/pay_ntTJS2H8hIeytels6RUj_1` |
| 2 | **Auth-type gate:** Non-HeaderKey Mifinity should fail with explicit `"Mifinity requires HeaderKey auth type"` (from PR's new arm) | **CODE-VERIFIED, runtime-unreachable on integ** | HS create-connector route rejects BodyKey upstream with `IR_06 "The auth type is invalid for the connector"` (pre-existing `connector_validation.rs`), so the PR's gate never executes via HTTP on integ. Gate exists at `connector_config.rs:1735` — verified in code at `origin/main` HEAD. |
| 3 | **Metadata-shape gate:** Wrong keys (`brand_identifier`, `destination_acct_num`) → `"Invalid Mifinity metadata format"` | **CODE-VERIFIED, runtime-unreachable on integ** | HS create-connector route rejects malformed metadata upstream with `IR_06 "The merchant_connector_account.metadata is invalid"`. Parse gate at `connector_config.rs:1723` unreachable via HTTP on this integ. |
| 4 | **Optional-field passthrough:** Metadata omitted → fields serialize absent, connector tolerant | **CODE-VERIFIED, runtime-blocked on integ** | Sending `metadata: null` or absent **also** returns `IR_06 "The merchant_connector_account.metadata is invalid"` — integ route-level validation enforces non-null metadata for mifinity, so the PR's `Option`-tolerant passthrough is unexercisable via HTTP. |
| 5 | **No regression on other UCS connectors** | **PASS** | `fiservcommercehub` MCA `mca_1IZ5SAaDDjauWeYcf5tx` + card payment → `pay_muErscIGMixQKyhOkdEv` `succeeded`. No UCS-path regression. |
| 6 | **Legacy direct (non-UCS) path untouched** | **PASS** | Same Mifinity body via direct path → `pay_zBOQmTzi5QttKtEUhAQK` `requires_customer_action` + `redirect_to_url` — identical legacy behavior. |
### Caveat
Integ's create-connector route layer enforces non-null metadata for mifinity, which masks two of the PR's own gates from HTTP-level testing (flags 2–4 above). The PR's code is correct as far as reachable; flags 2–4 need either route-level relaxation or unit tests to exercise end-to-end.
---
*Filed by HS-QUALIBOT (automated PR review pipeline). Evidence masked — no raw credentials included.*
Contributor guide
Research direction
Start in crates/router/src/core/unified_connector_service/connector_config.rs, especially the Mifinity arm around lines 1718-1735, and compare it with the reported integration results at origin/main. Determine whether route-level relaxation or unit tests should exercise the auth, metadata-shape, and optional-field gates; done means those paths are covered without regressing other UCS or legacy Mifinity flows.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend-api-design, payments
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 18/100