Skip to content
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

feat(router): add external authentication webhooks flow #4339

Merged
merged 10 commits into from
Apr 16, 2024

Conversation

sai-harsha-vardhan
Copy link
Contributor

@sai-harsha-vardhan sai-harsha-vardhan commented Apr 10, 2024

Type of Change

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

Description

add external authentication webhooks flow

When external 3ds authentication is completed, the result of the challenge along with cavv, eci values are sent as a notification from 3ds connectors. We should consume the webhook (only if 3ds connector psync is not enabled), and then do the payments confirm to perform the authorization.

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?

Sanity testing of payments, refunds and dispute webhooks (both using mca_id and connector name in url path)
Authentication webhooks can't be tested (will be implementing for netcetera then we'll be able to test)

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
  • I added a CHANGELOG entry if applicable

@sai-harsha-vardhan sai-harsha-vardhan added A-core Area: Core flows C-feature Category: Feature request or enhancement labels Apr 10, 2024
@sai-harsha-vardhan sai-harsha-vardhan added this to the April 2024 milestone Apr 10, 2024
@sai-harsha-vardhan sai-harsha-vardhan self-assigned this Apr 10, 2024
@sai-harsha-vardhan sai-harsha-vardhan requested review from a team as code owners April 10, 2024 10:59
authentication_id,
)
.await
.to_not_found_response(errors::ApiErrorResponse::InternalServerError)
Copy link
Member

Choose a reason for hiding this comment

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

shouldn't this be a 4xx?

connector_authentication_id,
)
.await
.to_not_found_response(errors::ApiErrorResponse::InternalServerError)
Copy link
Member

Choose a reason for hiding this comment

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

This also should be a 4xx

"received a non-external-authentication id for retrieving authentication",
)
}?;
let updated_authentication = state
Copy link
Member

Choose a reason for hiding this comment

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

should we move this configuration to merchant connector account?

@@ -40,6 +40,8 @@ pub struct Authentication {
pub acs_trans_id: Option<String>,
pub three_ds_server_trans_id: Option<String>,
pub acs_signed_content: Option<String>,
pub profile_id: String,
pub payment_id: Option<String>,
Copy link
Member

Choose a reason for hiding this comment

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

we should also have merchant_connector_id

business_profile,
))
.await
.attach_printable("Incoming webhook flow for mandates failed")?
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
.attach_printable("Incoming webhook flow for mandates failed")?
.attach_printable("Incoming webhook flow for external authentication failed")?

@sai-harsha-vardhan sai-harsha-vardhan requested a review from a team as a code owner April 15, 2024 11:12

#[derive(Clone, Debug, Deserialize)]
pub struct ExternalThreeDSConnectorMetadata {
pub pull_mechanism_for_external_3ds_enabled: Option<String>,
Copy link
Member

Choose a reason for hiding this comment

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

can we have this as an enum or bool instead of string?

@likhinbopanna likhinbopanna added this pull request to the merge queue Apr 16, 2024
Merged via the queue into main with commit 00cd96d Apr 16, 2024
10 of 12 checks passed
@likhinbopanna likhinbopanna deleted the add-external-authentication-webhooks-flow branch April 16, 2024 10:38
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants