Skip to content

Conversation

sai-harsha-vardhan
Copy link
Contributor

@sai-harsha-vardhan sai-harsha-vardhan commented Mar 4, 2025

Type of Change

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

Description

add capability to force challenge for 3DS Payments through Netcetera and send few optional fields

  1. Profile level enablement force_3ds_challenge which would request netcetera for challenge flow
  2. Send few optional fields like trans_type, which can potentially be required on PROD (Because docs says, it maybe required in some markets)

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?

Tested Manually
Perform a External 3DS payment by enabling force_3ds_challenge at profile level, and observe ThreeDSRequestorChallengeInd being sent "04" to netcetera connector

CURL

curl --location '{{BASE_URL}}/payments/{{PAYMENT_ID}}/3ds/authentication' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: {{PUBLISHABLE_KEY}}' \
--data '{
    "client_secret": "pay_SiyzAZBqOJgLShX0Kjxw_secret_vEfMKRmj8ovnvxVYJdqK",
    "device_channel": "BRW",
    "threeds_method_comp_ind": "Y"
}'

Response

{
    "trans_status": "C",
    "acs_url": "https://ndm-prev.3dss-non-prod.cloud.netcetera.com/acs/challenge",
    "challenge_request": "eyJtZXNzYWdlVHlwZSI6IkNSZXEiLCJ0aHJlZURTU2VydmVyVHJhbnNJRCI6IjRjY2M5ZGRkLWMxZGMtNGMyNy04YzAyLTg5NmE2MzI5MWMzZCIsImFjc1RyYW5zSUQiOiI5MWM0MWZjOS0zZDI1LTQ0OGItODA4MS1mMDkxOTg3NmM1ZTQiLCJjaGFsbGVuZ2VXaW5kb3dTaXplIjoiMDUiLCJtZXNzYWdlVmVyc2lvbiI6IjIuMy4xIn0",
    "acs_reference_number": "3DS_LOA_ACS_201_13579",
    "acs_trans_id": "91c41fc9-3d25-448b-8081-f0919876c5e4",
    "three_dsserver_trans_id": "4ccc9ddd-c1dc-4c27-8c02-896a63291c3d",
    "acs_signed_content": null,
    "three_ds_requestor_url": "https://google.com/"
}

image

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

@sai-harsha-vardhan sai-harsha-vardhan added A-core Area: Core flows C-feature Category: Feature request or enhancement labels Mar 4, 2025
@sai-harsha-vardhan sai-harsha-vardhan self-assigned this Mar 4, 2025
@sai-harsha-vardhan sai-harsha-vardhan requested review from a team as code owners March 4, 2025 15:12
@hyperswitch-bot hyperswitch-bot bot added the M-database-changes Metadata: This PR involves database schema changes label Mar 4, 2025
@sai-harsha-vardhan sai-harsha-vardhan changed the title Force 3ds challenge refactor netcetera feat(router): add capability to force challenge for 3DS Payments through Netcetera and send few optional fields Mar 4, 2025
swangi-kumari
swangi-kumari previously approved these changes Mar 5, 2025
@@ -207,6 +207,11 @@ impl SemanticVersion {
pub fn get_major(&self) -> u64 {
self.0.major
}

/// returns major version number
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
/// returns major version number
/// returns minor version number

@@ -1963,6 +1963,9 @@ pub struct ProfileCreate {

///Indicates if clear pan retries is enabled or not.
pub is_clear_pan_retries_enabled: Option<bool>,

/// Indicates if 3ds challenge is forced
pub force_3ds_challenge: Option<bool>,
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of optional, can we have this as bool only and make is false by default ?

@@ -65,6 +65,7 @@ pub struct Profile {
pub card_testing_guard_config: Option<CardTestingGuardConfig>,
pub card_testing_secret_key: OptionalEncryptableName,
pub is_clear_pan_retries_enabled: bool,
pub force_3ds_challenge: Option<bool>,
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here

@@ -0,0 +1,2 @@
ALTER TABLE business_profile
Copy link
Contributor

Choose a reason for hiding this comment

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

Query will also change if you are making it a mandatory field.

@Gnanasundari24 Gnanasundari24 added this pull request to the merge queue Mar 6, 2025
Merged via the queue into main with commit 957a228 Mar 6, 2025
14 of 20 checks passed
@Gnanasundari24 Gnanasundari24 deleted the force-3ds-challenge-refactor-netcetera branch March 6, 2025 13:37
Sakilmostak added a commit that referenced this pull request Mar 6, 2025
…ugh Netcetera and send few optional fields (#7429)

Co-authored-by: Sk Sakil Mostak <[email protected]>
Co-authored-by: Sakil Mostak <[email protected]>
pixincreate added a commit that referenced this pull request Mar 7, 2025
* 'main' of github.com:juspay/hyperswitch:
  feat(hipay): Add Template PR (#7360)
  chore(version): 2025.03.07.0
  chore(postman): update Postman collection files
  feat(analytics): add new filters, dimensions and metrics for authentication analytics (#7451)
  feat(router): add capability to force challenge for 3DS Payments through Netcetera and send few optional fields (#7429)
  feat(analytics): refactor and rewrite authentication related analytics (#7433)
  refactor(core): Added payment id in authentication router data (#7441)
  feat(connector): Added ThreeDs server integration template pr (#7424)
  fix(xendit): Fix wasm changes (#7419)
  chore(postman): postman tests fixes (#7159)
  ci(cypress): move customer acceptance in configs to a const within commons (#7435)
  feat(core): add additional revenue recovery call flow (#7402)
  chore(version): 2025.03.06.0
  feat(payment_link): expose payment link configs for SDK UI rules and payment button (#7427)
pixincreate added a commit that referenced this pull request Mar 7, 2025
…juspay/hyperswitch into connector/gpay-mandates-authorizedotnet

* 'connector/gpay-mandates-authorizedotnet' of github.com:juspay/hyperswitch: (25 commits)
  ci(cypress): address lints and refactor redirection handler (#7437)
  chore: make v1 merchant account forward compatible (#7426)
  fix(dashboard): Added auth key to juspay threeds server (#7457)
  feat(hipay): Add Template PR (#7360)
  chore(version): 2025.03.07.0
  chore(postman): update Postman collection files
  feat(analytics): add new filters, dimensions and metrics for authentication analytics (#7451)
  feat(router): add capability to force challenge for 3DS Payments through Netcetera and send few optional fields (#7429)
  feat(analytics): refactor and rewrite authentication related analytics (#7433)
  refactor(core): Added payment id in authentication router data (#7441)
  feat(connector): Added ThreeDs server integration template pr (#7424)
  fix(xendit): Fix wasm changes (#7419)
  chore(postman): postman tests fixes (#7159)
  ci(cypress): move customer acceptance in configs to a const within commons (#7435)
  feat(core): add additional revenue recovery call flow (#7402)
  chore(version): 2025.03.06.0
  feat(payment_link): expose payment link configs for SDK UI rules and payment button (#7427)
  feat(connector): [EFT] Add EFT as a payment method (#7304)
  chore(version): 2025.03.05.1
  feat(connector): [Moneris] Implement mandate for Moneris (#7322)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-core Area: Core flows C-feature Category: Feature request or enhancement M-database-changes Metadata: This PR involves database schema changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants