Skip to content

feat(core): Add first_name and last_name as Secret<String> Types. #9326

Merged
likhinbopanna merged 4 commits intomainfrom
user_name_fix
Sep 11, 2025
Merged

feat(core): Add first_name and last_name as Secret<String> Types. #9326
likhinbopanna merged 4 commits intomainfrom
user_name_fix

Conversation

@Debarshi-Gupta
Copy link
Contributor

@Debarshi-Gupta Debarshi-Gupta commented Sep 9, 2025

Type of Change

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

Description

Bumped up the UCS Client dependency in order to bring in the latest changes of having first_name and last_name as SecretString types.

Additional Changes

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

Motivation and Context

Bumped up the UCS Client dependency in order to bring in the latest changes of having first_name and last_name as SecretString types.

How did you test it?

Postman Tests

-Request

curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_2sNDWM7tQ74dZIqGZeA2alVCBDBImYmamcnQBvAeG71TIJCY9ope0SaZjyAzCwMI' \
--data '{
    "amount": 300,
    "currency": "USD",
    "confirm": true,
    "capture_method": "automatic",
    "capture_on": "2022-09-10T10:11:12Z",
    "amount_to_capture": 300,
    "customer_id": "StripeCustomer",
    "name": "John Doe",
    "phone": "999999999",
    "phone_country_code": "+1",
    "description": "Its my first payment request",
    "profile_id": "pro_C4bbikZORyrPhXxE3giN",
    "authentication_type": "no_three_ds",
    "return_url": "https://google.com",
    "payment_method": "card",
    "payment_method_type": "credit",
    "payment_method_data": {
        "card": {
            "card_number": "4111111111111111",
            "card_exp_month": "03",
            "card_exp_year": "2030",
            "card_holder_name": "joseph Doe",
            "card_cvc": "737",
            "card_network": "Visa"
        }
    },
    "billing": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "city": "San Fransico",
            "state": "California",
            "zip": "94122",
            "country": "US",
            "first_name": "PiX"
        }
    },
    
    "statement_descriptor_name": "joseph",
    "statement_descriptor_suffix": "JS",
    "metadata": {
        "udf1": "value1",
        "new_customer": "true",
        "login_date": "2019-09-10T10:11:12Z"
    },
    "browser_info": {
        "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36",
        "accept_header": "text\\/html,application\\/xhtml+xml,application\\/xml;q=0.9,image\\/webp,image\\/apng,*\\/*;q=0.8",
        "language": "en-GB",
        "color_depth": 30,
        "screen_height": 1117,
        "screen_width": 1728,
        "time_zone": -330,
        "java_enabled": true,
        "java_script_enabled": true
    }
}'

-Response

{
    "payment_id": "pay_3fFty3UZ9qptdUYXn3zz",
    "merchant_id": "merchant_1752766461",
    "status": "succeeded",
    "amount": 300,
    "net_amount": 300,
    "shipping_cost": null,
    "amount_capturable": 0,
    "amount_received": 300,
    "connector": "adyen",
    "client_secret": "pay_3fFty3UZ9qptdUYXn3zz_secret_foQcu0jMTPbZbP73DKHn",
    "created": "2025-09-10T00:58:49.656Z",
    "currency": "USD",
    "customer_id": "StripeCustomer",
    "customer": {
        "id": "StripeCustomer",
        "name": "John Doe",
        "email": null,
        "phone": "999999999",
        "phone_country_code": "+1"
    },
    "description": "Its my first payment request",
    "refunds": null,
    "disputes": null,
    "mandate_id": null,
    "mandate_data": null,
    "setup_future_usage": null,
    "off_session": null,
    "capture_on": null,
    "capture_method": "automatic",
    "payment_method": "card",
    "payment_method_data": {
        "card": {
            "last4": "1111",
            "card_type": null,
            "card_network": null,
            "card_issuer": null,
            "card_issuing_country": null,
            "card_isin": "411111",
            "card_extended_bin": null,
            "card_exp_month": "03",
            "card_exp_year": "2030",
            "card_holder_name": "joseph Doe",
            "payment_checks": null,
            "authentication_data": null
        },
        "billing": null
    },
    "payment_token": null,
    "shipping": null,
    "billing": {
        "address": {
            "city": "San Fransico",
            "country": "US",
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "zip": "94122",
            "state": "California",
            "first_name": "PiX",
            "last_name": null,
            "origin_zip": null
        },
        "phone": null,
        "email": null
    },
    "order_details": null,
    "email": null,
    "name": "John Doe",
    "phone": "999999999",
    "return_url": "https://google.com/",
    "authentication_type": "no_three_ds",
    "statement_descriptor_name": "joseph",
    "statement_descriptor_suffix": "JS",
    "next_action": null,
    "cancellation_reason": null,
    "error_code": null,
    "error_message": null,
    "unified_code": null,
    "unified_message": null,
    "payment_experience": null,
    "payment_method_type": "credit",
    "connector_label": null,
    "business_country": null,
    "business_label": "default",
    "business_sub_label": null,
    "allowed_payment_method_types": null,
    "ephemeral_key": {
        "customer_id": "StripeCustomer",
        "created_at": 1757465929,
        "expires": 1757469529,
        "secret": "epk_98a46cd4be004c968979379b32778a35"
    },
    "manual_retry_allowed": false,
    "connector_transaction_id": "PSGBGW5GSX824WV5",
    "frm_message": null,
    "metadata": {
        "udf1": "value1",
        "login_date": "2019-09-10T10:11:12Z",
        "new_customer": "true"
    },
    "connector_metadata": null,
    "feature_metadata": {
        "redirect_response": null,
        "search_tags": null,
        "apple_pay_recurring_details": null,
        "gateway_system": "unified_connector_service"
    },
    "reference_id": "pay_3fFty3UZ9qptdUYXn3zz_1",
    "payment_link": null,
    "profile_id": "pro_C4bbikZORyrPhXxE3giN",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_Hy9HAyMjCXQPYhT0LjL8",
    "incremental_authorization_allowed": false,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2025-09-10T01:13:49.656Z",
    "fingerprint": null,
    "browser_info": {
        "language": "en-GB",
        "time_zone": -330,
        "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36",
        "color_depth": 30,
        "java_enabled": true,
        "screen_width": 1728,
        "accept_header": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,image\/apng,*\/*;q=0.8",
        "screen_height": 1117,
        "java_script_enabled": true
    },
    "payment_channel": null,
    "payment_method_id": null,
    "network_transaction_id": "270466062265778",
    "payment_method_status": null,
    "updated": "2025-09-10T00:58:52.846Z",
    "split_payments": null,
    "frm_metadata": null,
    "extended_authorization_applied": null,
    "capture_before": null,
    "merchant_order_reference_id": null,
    "order_tax_amount": null,
    "connector_mandate_id": null,
    "card_discovery": "manual",
    "force_3ds_challenge": false,
    "force_3ds_challenge_trigger": false,
    "issuer_error_code": null,
    "issuer_error_message": null,
    "is_iframe_redirection_enabled": null,
    "enable_partial_authorization": null,
    "enable_overcapture": null,
    "is_overcapture_enabled": null
}

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

@Debarshi-Gupta Debarshi-Gupta self-assigned this Sep 9, 2025
@Debarshi-Gupta Debarshi-Gupta requested review from a team as code owners September 9, 2025 11:44
@semanticdiff-com
Copy link

semanticdiff-com bot commented Sep 9, 2025

Review changes with  SemanticDiff

Changed Files
File Status
  crates/router/src/core/unified_connector_service/transformers.rs  96% smaller
  Cargo.lock Unsupported file format
  crates/external_services/Cargo.toml Unsupported file format
  crates/router/Cargo.toml Unsupported file format

@Debarshi-Gupta Debarshi-Gupta changed the title bumped ucs client dependency feat(core): Add first_name and last_name as Secret<String> Types. Sep 9, 2025
@Debarshi-Gupta Debarshi-Gupta added A-core Area: Core flows A-framework Area: Framework labels Sep 10, 2025
@likhinbopanna likhinbopanna added this pull request to the merge queue Sep 11, 2025
Merged via the queue into main with commit 08ca156 Sep 11, 2025
23 of 28 checks passed
@likhinbopanna likhinbopanna deleted the user_name_fix branch September 11, 2025 12:14
pixincreate added a commit that referenced this pull request Sep 11, 2025
…ee-ds

* 'main' of github.com:juspay/hyperswitch:
  feat(webhooks): Provide outgoing webhook support for revenue recovery (#9294)
  feat(connector): Add Peachpayments Template Code (#9363)
  feat(connector): [Paysafe] Implement card 3ds flow (#9305)
  feat(router): Add Connector changes for 3ds (v2) (#9117)
  feat(connector): [ADYEN] Add support to ideal Mandate Webhook (#9347)
  refactor(core): accept manual retry from profile  (#9302)
  fix(nuvei): nuvei 3ds fix + psync fix (#9279)
  fix(connector): [checkout] Add US Support for Apple Pay and Google Pay + Enhanced Checkout Response Data (#9356)
  fix(router): adding connector_customer_id for external vault proxy (#9263)
  feat(core): Add first_name and last_name as Secret<String> Types.  (#9326)
  feat(injector): injector request formation changes (#9306)
  fix(revenue-recovery): Update Redis TTL for customer locks after token selection (#9282)
  chore(version): 2025.09.11.0
  refactor(connector): [Paysafe] fix wasm (#9349)
  refactor(connector): rename RevenueRecoveryRecordBack as InvoiceRecordBack (#9321)
  feat(connector): [checkout] add support for MOTO payments (#9327)
  feat(connector): enhance ACI connector with comprehensive 3DS support - DRAFT (#8986)
  feat(core): [Retry] MIT Retries (#8628)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-core Area: Core flows A-framework Area: Framework

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants