Skip to content

feat(core): Added additional authentication fields for 3ds external authentication #8758

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

Merged
merged 4 commits into from
Aug 5, 2025

Conversation

dgeee13
Copy link
Contributor

@dgeee13 dgeee13 commented Jul 25, 2025

Type of Change

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

Description

This PR introduces the following changes

  1. Added additional authentication fields for 3ds external authentication, the fields are as following
  • challenge_code
  • challenge_code_reason
  • challenge_cancel
  • message_extension
  1. Added additional fields for Cybersource payments request corresponding to the newly added auth fields
  2. Added additional request fields for Netcetera, and other 3ds connectors corresponding to the newly added auth fields

Context - Cybersource payments via Netcetera are failing for a France based acquirer in prod, the above fields are added to fix the same.

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?

Card used for testing (mastercard with challenge flow)

5306 8899 4283 3340

Successful 3DS challenge completion flow

Tested using local hyperswitch sdk and hyperswitch backend

Test video

Connector Request for Cybersource:
Screenshot 2025-07-30 at 8 39 57 PM

cavvAlgorithm - "02"
paresStatus - "Y"
challengeCode - Null (Please note - This is not supposed to be null, checking with Netcetera team since it's coming as None from Netcetera) Fix merged in PR
paresStatusReason - Null (Please note - Null is not expected here,checking this with Netcetera team) Fix raised here PR
challengeCancelCode - Null (Please note - Null is expected here, as challenge is not cancelled)
networkScore - Null (Please note - Null is expected here, as card is not CartesBancaires and also since it is not production environment - messageExtension field is only available on production)
acsTransactionId - "9187c2cb-54f8-4e70-a63b-537046c2b34d"

3DS challenge cancel flow

Tested using local hyperswitch sdk and hyperswitch backend
Test video

Incoming Webhook from Netcetera on cancelling challenge:
Screenshot 2025-07-30 at 9 23 53 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

@dgeee13 dgeee13 self-assigned this Jul 25, 2025
@dgeee13 dgeee13 requested review from a team as code owners July 25, 2025 07:36
@dgeee13 dgeee13 added the A-core Area: Core flows label Jul 25, 2025
Copy link

semanticdiff-com bot commented Jul 25, 2025

Review changes with  SemanticDiff

Changed Files
File Status
  crates/hyperswitch_connectors/src/connectors/nuvei/transformers.rs  15% smaller
  crates/hyperswitch_connectors/src/connectors/netcetera/transformers.rs  10% smaller
  crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs  10% smaller
  crates/hyperswitch_domain_models/src/router_response_types.rs  1% smaller
  crates/diesel_models/src/authentication.rs  0% smaller
  crates/diesel_models/src/schema.rs  0% smaller
  crates/diesel_models/src/schema_v2.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/gpayments.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/gpayments/transformers.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/netcetera.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/netcetera/netcetera_types.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/threedsecureio.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/threedsecureio/transformers.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/unified_authentication_service/transformers.rs  0% smaller
  crates/hyperswitch_domain_models/src/router_request_types.rs  0% smaller
  crates/hyperswitch_domain_models/src/router_request_types/authentication.rs  0% smaller
  crates/hyperswitch_domain_models/src/router_request_types/unified_authentication_service.rs  0% smaller
  crates/hyperswitch_interfaces/src/authentication.rs  0% smaller
  crates/router/src/core/authentication/utils.rs Unsupported file format
  crates/router/src/core/payments/types.rs  0% smaller
  crates/router/src/core/unified_authentication_service.rs  0% smaller
  crates/router/src/core/unified_authentication_service/utils.rs Unsupported file format
  crates/router/src/core/webhooks/incoming.rs  0% smaller
  crates/router/src/db/authentication.rs  0% smaller
  migrations/2025-07-25-115018_add_authn_fields_challenge_code_cancel_reason_message_extension/down.sql Unsupported file format
  migrations/2025-07-25-115018_add_authn_fields_challenge_code_cancel_reason_message_extension/up.sql Unsupported file format

@hyperswitch-bot hyperswitch-bot bot added the M-database-changes Metadata: This PR involves database schema changes label Jul 25, 2025
@dgeee13 dgeee13 force-pushed the cybersource-3ds-authentication branch 2 times, most recently from 6f623f0 to b0e017c Compare July 28, 2025 08:55
@dgeee13 dgeee13 closed this Jul 28, 2025
@dgeee13 dgeee13 reopened this Jul 28, 2025
@dgeee13 dgeee13 force-pushed the cybersource-3ds-authentication branch 2 times, most recently from ebcc587 to 7cccff2 Compare July 30, 2025 14:34
@dgeee13 dgeee13 linked an issue Jul 30, 2025 that may be closed by this pull request
2 tasks
@dgeee13 dgeee13 force-pushed the cybersource-3ds-authentication branch 3 times, most recently from 2129558 to 814560d Compare August 1, 2025 07:40
deepanshu-iiitu
deepanshu-iiitu previously approved these changes Aug 1, 2025
Copy link
Contributor

@deepanshu-iiitu deepanshu-iiitu left a comment

Choose a reason for hiding this comment

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

connector changes look good

@dgeee13 dgeee13 force-pushed the cybersource-3ds-authentication branch from 640dac8 to 4e71716 Compare August 5, 2025 10:59
@dgeee13 dgeee13 requested a review from a team as a code owner August 5, 2025 10:59
@dgeee13 dgeee13 force-pushed the cybersource-3ds-authentication branch 2 times, most recently from fda3a7a to 01cd041 Compare August 5, 2025 11:04
@dgeee13 dgeee13 removed the request for review from a team August 5, 2025 11:27
@@ -313,6 +314,7 @@ impl TryFrom<&SetupMandateRouterData> for CybersourceZeroMandateRequest {
))?
}
};
let cavv_algorithm = Some("2".to_string());
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you please give some code comments explaining the reason of hardcoding this?

Copy link
Contributor Author

@dgeee13 dgeee13 Aug 5, 2025

Choose a reason for hiding this comment

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

@sai-harsha-vardhan,
I have added a comment with the reasoning here.
Since this value is being set to "2" in multiple places, I avoided repeating the explanation throughout the code.

deepanshu-iiitu
deepanshu-iiitu previously approved these changes Aug 5, 2025
@dgeee13 dgeee13 requested a review from jagan-jaya August 5, 2025 12:30
jagan-jaya
jagan-jaya previously approved these changes Aug 5, 2025
@dgeee13 dgeee13 force-pushed the cybersource-3ds-authentication branch from 01cd041 to 6f395bf Compare August 5, 2025 14:53
@dgeee13 dgeee13 force-pushed the cybersource-3ds-authentication branch from be506c9 to 5d05ffd Compare August 5, 2025 16:33
@likhinbopanna likhinbopanna enabled auto-merge August 5, 2025 17:18
@likhinbopanna likhinbopanna added this pull request to the merge queue Aug 5, 2025
Merged via the queue into main with commit 89774f3 Aug 5, 2025
18 of 22 checks passed
@likhinbopanna likhinbopanna deleted the cybersource-3ds-authentication branch August 5, 2025 18:05
pixincreate added a commit that referenced this pull request Aug 6, 2025
…ordea-sepa

* 'main' of github.com:juspay/hyperswitch: (89 commits)
  feat(router): [worldpayvantiv] add dispute list sync and implement dispute (#8830)
  feat(core): Add support for Void after Capture (#8839)
  fix(wasm): [FISERV] Added GooglePay Payment Method Type (#8832)
  feat(connector): [Barclaycard] Add Google Pay Payment Method (#8786)
  chore(version): 2025.08.06.0
  feat(core): Added additional authentication fields for 3ds external authentication (#8758)
  refactor(core): propagate network_transaction_id in response of payment (#8829)
  fix(core): add fix for stopping multiple event locking idempotent logs (#8034)
  feat(connector): [AUTHORIZEDOTNET] create connector customer flow added (#8774)
  feat(core): Add L2_L3 Data Support  (#8828)
  feat(connector): [NMI] Add mandates flow (#8652)
  fix(connector): [Wise] send uuid as connector_transaction_id (#8836)
  feat(core): populate UCS status_code in response headers (#8788)
  feat(external_services): Fixed Url for Unified Connector Service gRPC Client (#8587)
  chore: reorder v2 migrations folders (#8671)
  fix(router): Take merchant ID from headers in API Key - Revoke (v2) (#8808)
  fix(connector): (payload) currency auth key wasm changes (#8825)
  feat(payment-methods): add filtering logic for payment method list v2 (#8606)
  feat(router): add support for apple pay pre-decrypted token in the payments confirm call (#8815)
  chore(version): 2025.08.05.0
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-core Area: Core flows M-database-changes Metadata: This PR involves database schema changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Add additional authentication fields for 3ds external authentication
6 participants