Skip to content

fix(connector): add payconex to ucs_only_connectors in env_specific config#12856

Merged
shuklatushar226 merged 1 commit into
mainfrom
fix/payconex-ucs-only-env-specific
Jun 21, 2026
Merged

fix(connector): add payconex to ucs_only_connectors in env_specific config#12856
shuklatushar226 merged 1 commit into
mainfrom
fix/payconex-ucs-only-env-specific

Conversation

@shuklatushar226

Copy link
Copy Markdown
Contributor

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates
  • Documentation
  • CI/CD

Description

PayConex is a UCS-only connector — its native Hyperswitch connector is a stub (PAYCONEX_SUPPORTED_PAYMENT_METHODS = SupportedPaymentMethods::new(), every flow returns NotImplemented). It only works when routed through the Unified Connector Service (UCS), which requires its name to be present in grpc_client.unified_connector_service.ucs_only_connectors.

Deployed environments build their effective config by merging config/deployments/env_specific.toml over the per-environment file. That override file was missing payconex from ucs_only_connectors, so in deployed environments determine_connector_integration_type returned DirectandUCSConnector instead of UcsConnector, the gateway decision fell back to Direct, and the native stub rejected the card:

HTTP 400 BadRequest — "Payment method type not supported" / reason: "card is not supported by payconex"

The request never reached UCS. It worked locally only because RUN_ENV=development reads config/development.toml, which already lists payconex.

#12608 (which introduced PayConex) added payconex to development.toml, integration_test.toml, sandbox.toml, and production.toml, but not to env_specific.toml. This PR closes that gap.

Additional Changes

  • This PR modifies the API contract
  • This PR modifies the database schema
  • This PR modifies application configuration/environment variables

config/deployments/env_specific.toml — added payconex to ucs_only_connectors.

Motivation and Context

Closes #12855

PayConex payments are unusable in all deployed environments (integration_test / sandbox / production) without this entry, because the connector has no native implementation and must be routed via UCS.

How did you test it?

Diagnosed from a failing integration request (Grafana request id 019ee39c-8322-7333-90eb-9d999d54a42b): logs show Using DirectandUCSConnector - not in ucs_only_listgateway=Direct400 "card is not supported by payconex", confirming the request never reached UCS. Adding payconex to ucs_only_connectors makes determine_connector_integration_type return UcsConnector, forcing the UCS path — identical to the working local behavior, where development.toml already contains the entry. This mirrors the same entry already present in integration_test.toml, sandbox.toml, and production.toml.

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

…onfig

PayConex is a UCS-only connector and only works when routed through UCS, which requires its name in `ucs_only_connectors`. Deployed environments merge `config/deployments/env_specific.toml` as the effective override, and it was missing `payconex` (it was added only to development/integration_test/sandbox/production configs in #12608). As a result PayConex payments fell back to the native connector stub in deployed envs and failed with "card is not supported by payconex"; the request never reached UCS.
@shuklatushar226
shuklatushar226 requested a review from a team as a code owner June 20, 2026 06:50
@semanticdiff-com

Copy link
Copy Markdown

Review changes with  SemanticDiff

@XyneSpaces

Copy link
Copy Markdown
Contributor

test

@XyneSpaces

Copy link
Copy Markdown
Contributor

[should-fix] Verify config consistency for ucs_only_connectors

The change to add payconex to ucs_only_connectors in env_specific.toml appears correct per the PR description.

However, there's a config format inconsistency worth addressing:

Config File Format
config/deployments/env_specific.toml String: "imerchantsolutions, paytm, ..."
config/development.toml Array: ucs_only_connectors = []
config/deployments/sandbox.toml Array: ucs_only_connectors = []
config/docker_compose.toml Array: ucs_only_connectors = []

Questions:

  1. Should payconex also be added to the development/testing configs for local development parity?
  2. Is the string vs array format difference intentional, or should these be normalized?

If developers test locally with development.toml (empty array = no UCS-only connectors), they won't catch PayConex routing issues until deployment.

# Suggested for development.toml (if desired)
ucs_only_connectors = ["payconex", "imerchantsolutions", "paytm", ...]

@XyneSpaces XyneSpaces left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewing the payconex addition to ucs_only_connectors. One minor suggestion on ordering.

base_url = "http://localhost:8000" # Unified Connector Service Base URL
connection_timeout = 10 # Connection Timeout Duration in Seconds
ucs_only_connectors = "imerchantsolutions, paytm, phonepe, hyperpg, revolv3, fiservcommercehub, absa_sanlam, interpayments" # Comma-separated list of connectors that use UCS only
ucs_only_connectors = "imerchantsolutions, paytm, phonepe, hyperpg, revolv3, fiservcommercehub, absa_sanlam, interpayments, payconex" # Comma-separated list of connectors that use UCS only

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nit] Consider alphabetical ordering

The connector list is easier to maintain when sorted alphabetically. payconex should come before phonepe in the sequence. Also, please link to the payconex connector implementation PR in the description for traceability.

Suggested change:

ucs_only_connectors = "absa_sanlam, fiservcommercehub, hyperpg, imerchantsolutions, interpayments, payconex, paytm, phonepe, revolv3"

@shuklatushar226
shuklatushar226 added this pull request to the merge queue Jun 21, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 21, 2026
@shuklatushar226
shuklatushar226 added this pull request to the merge queue Jun 21, 2026
Merged via the queue into main with commit 806d13d Jun 21, 2026
36 of 39 checks passed
@shuklatushar226
shuklatushar226 deleted the fix/payconex-ucs-only-env-specific branch June 21, 2026 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] PayConex payments fail in deployed envs — missing from ucs_only_connectors in env_specific.toml

4 participants