Skip to content

fix(core): connector customer id population dependency removed from config #8937

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

swetasharma03
Copy link
Contributor

@swetasharma03 swetasharma03 commented Aug 13, 2025

Type of Change

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

Description

  • We were required to populate connector_customer_id after merchant migrates the data (data having connector_customer_id) in shopper_reference_id (customer_id for Adyen).

  • But connector_customer_id gets populated in router_data only for connectors listed under:

[connector_customer]
connector_list = "adyen,facilitapay,gocardless,hyperswitch_vault,stax,stripe"

To ensure the value gets populated for Adyen (to populate in shopper_reference), we added Adyen to this list.

    1. But this list also controls whether the CreateConnectorCustomer flow is automatically triggered for the mentioned connectors. As a result, for every Adyen payment, the system attempts to trigger CreateConnectorCustomer, which is not implemented for Adyen.

This caused the error to be repeatedly logged from crates/router/src/core/payments/customers.rs line 69, but payments are still successful.

let connector_customer_id = match resp.response {
        Ok(response) => match response {
            types::PaymentsResponseData::ConnectorCustomerResponse {
                connector_customer_id,
            } => Some(connector_customer_id),
            _ => None,
        },
        Err(err) => {
            logger::error!(create_connector_customer_error=?err);
            None
        }
    };

In this PR, the dependency of connector_customer_id on connector_customer config for getting populated in RouterData is been removed and also Adyen is removed from connector_customer config, which will prevent createConnectorCustomer flow getting triggered for Adyen, but still we can use connector_customer_id (if present after data migration).

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?

Screenshot 2025-08-13 at 4 04 17 PM

2/31 failed

In main, 4/31 failed:
Screenshot 2025-08-13 at 4 06 08 PM

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

@swetasharma03 swetasharma03 requested review from a team as code owners August 13, 2025 09:44
Copy link

semanticdiff-com bot commented Aug 13, 2025

Review changes with  SemanticDiff

Changed Files
File Status
  crates/router/src/core/payments/customers.rs  53% smaller
  config/config.example.toml Unsupported file format
  config/deployments/integration_test.toml Unsupported file format
  config/deployments/production.toml Unsupported file format
  config/deployments/sandbox.toml Unsupported file format
  config/development.toml Unsupported file format
  config/docker_compose.toml Unsupported file format
  loadtest/config/development.toml Unsupported file format

@swetasharma03 swetasharma03 changed the title connector customer id dependency removed from config fix(core): connector customer id dependency removed from config Aug 13, 2025
@swetasharma03 swetasharma03 self-assigned this Aug 13, 2025
@swetasharma03 swetasharma03 changed the title fix(core): connector customer id dependency removed from config fix(core): connector customer id population dependency removed from config Aug 13, 2025
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.

3 participants