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): send poll_config in next_action of confirm response for external 3ds flow #4443
feat(router): send poll_config in next_action of confirm response for external 3ds flow #4443
Conversation
.change_context(errors::ApiErrorResponse::InternalServerError) | ||
.attach_printable("The poll config was not found in the DB")?; | ||
let poll_config = | ||
serde_json::from_str::<Option<core_types::PollConfig>>(&poll_config.config) |
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 you use ParseStruct here? and in other places too where we are doing this for poll config
let poll_config = state | ||
.store | ||
.find_config_by_key_unwrap_or( | ||
&format!("poll_config_external_three_ds_{authentication_connector_name}"), |
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.
If PollConfig is a connector property, This logic can be moved into a impl function in PollConfig.
@@ -592,6 +594,7 @@ where | |||
three_ds_method_data: None, | |||
three_ds_method_url: None, | |||
}), | |||
poll_config: api_models::payments::PollConfigResponse {poll_id: request_poll_id, delay_in_secs: poll_config.delay_in_secs, frequency: poll_config.frequency}, |
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.
Nit pick.
PollConfigResponse
can have function named new
that would accept poll_id and poll_config and return the constructed PollConfigResponse
.
…to-env * 'main' of github.com:juspay/hyperswitch: Refactor(core): remove payment_method_id from RouterData struct (#4485) fix(euclid_wasm): connector config wasm metadata update (#4460) chore(version): 2024.04.30.0 feat(user): add single purpose token and auth (#4470) feat: stripe connect integration for payouts (#2041) feat(router): handle authorization for frictionless flow in external 3ds flow (#4471) feat(FRM): Revise post FRM core flows (#4394) feat(router): send poll_config in next_action of confirm response for external 3ds flow (#4443) chore(version): 2024.04.29.0 feat(connector): [CRYPTOPAY] Report underpaid/overpaid amount in outgoing webhooks (#4468) feat(users): use cookie for auth (#4434) refactor(scheduler): join frequency and count in `RetryMapping` (#4313) refactor(required_fields): change required fields for billing address (#4258) refactor(access_token): use `merchant_connector_id` for storing access token (#4462) chore(version): 2024.04.26.0 chore(postman): update Postman collection files
* 'main' of github.com:juspay/hyperswitch: refactor(cypress): read creds from env instead of hardcoding the path (#4430) ci: fix paypal postman tests (#4501) Refactor(core): remove payment_method_id from RouterData struct (#4485) fix(euclid_wasm): connector config wasm metadata update (#4460) chore(version): 2024.04.30.0 feat(user): add single purpose token and auth (#4470) feat: stripe connect integration for payouts (#2041) feat(router): handle authorization for frictionless flow in external 3ds flow (#4471) feat(FRM): Revise post FRM core flows (#4394) feat(router): send poll_config in next_action of confirm response for external 3ds flow (#4443) chore(version): 2024.04.29.0 feat(connector): [CRYPTOPAY] Report underpaid/overpaid amount in outgoing webhooks (#4468) feat(users): use cookie for auth (#4434) refactor(scheduler): join frequency and count in `RetryMapping` (#4313) refactor(required_fields): change required fields for billing address (#4258) refactor(access_token): use `merchant_connector_id` for storing access token (#4462) chore(version): 2024.04.26.0 chore(postman): update Postman collection files
Type of Change
Description
send poll_config in next_action of confirm response for external 3ds flow
Additional Changes
Motivation and Context
How did you test it?
Tested Manually
Next action block of confirm response for external 3ds flow would contain poll_config (default poll_config is given if it's not set for a connector)
Update the poll_config for a connector
Next action block of confirm response for external 3ds flow would contain updated poll_config
Checklist
cargo +nightly fmt --all
cargo clippy