-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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(connector): [DataTrans] ADD 3DS Flow #6026
feat(connector): [DataTrans] ADD 3DS Flow #6026
Conversation
Changed Files
|
ce511fb
to
35b85d5
Compare
pub struct CardHolder { | ||
cardholder_name: Secret<String>, | ||
email: Email, | ||
bill_addr_line1: Secret<String>, | ||
bill_addr_post_code: Secret<String>, | ||
bill_addr_city: String, | ||
bill_addr_state: Secret<String>, | ||
bill_addr_country: common_enums::CountryAlpha2, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make only required fields as mandatory and add the in crates/router/src/configs/defaults.rs
.
Make strongly recommended fields as optional and add a comment highlighting those fields.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
incremental_authorization_allowed: Some( | ||
status == enums::AttemptStatus::Authorized, | ||
), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will always be false hence no need to pass it here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
connectors: &settings::Connectors, | ||
) -> CustomResult<String, errors::ConnectorError> { | ||
let base_url = self.base_url(connectors); | ||
Ok(format!("{base_url}v1/transactions/authorize")) | ||
if req.is_three_ds() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please test PSYNC, Capture, Refunds and Incremental Auth for 3DS transactions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tested ,
For incremental Auth we have a different merchant account. Not able to test 3ds + incremental Auth
Except that everything is working
4303fba
to
7c59b17
Compare
const REDIRECTION_SBX_URL: &str = "https://pay.sandbox.datatrans.com"; | ||
const REDIRECTION_PROD_URL: &str = "https://pay.datatrans.com"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why have we hardcoded these URLs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This URL is used in the 3DS redirection
fn handle_response(
&self,
data: &types::PaymentsAuthorizeRouterData,
event_builder: Option<&mut ConnectorEvent>,
res: Response,
) -> CustomResult<types::PaymentsAuthorizeRouterData, errors::ConnectorError> {
let response: datatrans::DatatransResponse = res
.response
.parse_struct("Datatrans PaymentsAuthorizeResponse")
.change_context(errors::ConnectorError::ResponseDeserializationFailed)?;
event_builder.map(|i| i.set_response_body(&response));
router_env::logger::info!(connector_response=?response);
types::RouterData::try_from(types::ResponseRouterData {
response,
data: data.clone(),
http_code: res.status_code,
})
}
in handle response there's no other way to retrieve the base/secondary_url ( connectors: &settings::Connectors, not there in handle_response) ,Had to hard code it
@@ -129,6 +129,8 @@ pub struct PaymentsIncrementalAuthorizationData { | |||
pub currency: storage_enums::Currency, | |||
pub reason: Option<String>, | |||
pub connector_transaction_id: String, | |||
pub minor_additional_amount: MinorUnit, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think, instead of adding new minor fields here, we should refactor the existing fields as minor unit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
7c59b17
to
9522536
Compare
8c2c8d2
to
d9d162e
Compare
router_env::logger::info!(connector_response=?response); | ||
Ok(ErrorResponse { | ||
status_code: res.status_code, | ||
code: response.clone(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make this NO_ERROR_CODE
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
7826e2c
to
6a846de
Compare
crates/hyperswitch_connectors/src/connectors/datatrans/transformers.rs
Outdated
Show resolved
Hide resolved
4ec716d
to
d1fbbb3
Compare
…ced-payment-flows
…unt-configurable * 'main' of github.com:juspay/hyperswitch: (37 commits) refactor(router): add display_name field to connector feature api (#7121) ci(cypress): Add Tests for Customer Deletion and Psync flows (#7158) feat(connector): [DataTrans] ADD 3DS Flow (#6026) chore(version): 2025.02.07.0 chore(connectors): [fiuu] update pm_filters for apple pay and google pay (#7182) feat(router): add `organization_id` in authentication table and add it in authentication events (#7168) fix(dashboard_metadata): mask `poc_email` and `data_value` for DashboardMetadata (#7130) feat(core): Add support for v2 payments get intent using merchant reference id (#7123) refactor(customer): return redacted customer instead of error (#7122) fix(connector): handle unexpected error response from bluesnap connector (#7120) feat(routing): Contract based routing integration (#6761) refactor(dynamic_fields): dynamic fields for Adyen and Stripe, renaming klarnaCheckout, WASM for KlarnaCheckout (#7015) feat(connector): [COINGATE] Add Template PR (#7052) chore(roles): remove redundant variant from PermissionGroup (#6985) refactor(router): store `network_transaction_id` for `off_session` payments irrespective of the `is_connector_agnostic_mit_enabled` config (#7083) chore(connector): [Fiuu] log keys in the PSync response (#7189) ci(cypress): fix nmi and paypal (#7173) chore(version): 2025.02.06.0 chore(postman): update Postman collection files feat(connector): [Deutschebank] Add Access Token Error struct (#7127) ...
Type of Change
Description
Added 3DS Flow
Additional Changes
Motivation and Context
How did you test it?
Three 3ds
Checklist
cargo +nightly fmt --all
cargo clippy