-
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(core): [Network Tokenization] pre network tokenization #6873
base: main
Are you sure you want to change the base?
Conversation
276d588
to
5c13cc8
Compare
a5845b1
to
3f9c0ba
Compare
16e0f52
to
dcc8625
Compare
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.
also when constructing router data, if pre-tokenization enabled, we need to pass network token data as payment method data. Could you point me to that change?
if is_pre_tokenization_enabled && is_nt_supported_connector_available { | ||
let pre_tokenization_response = tokenization::pre_payment_tokenization( |
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 this validation for pre-network tokenization move to a a function?
.await?; | ||
let pm_data = payment_data.get_payment_method_data(); | ||
match pre_tokenization_response { | ||
(Some(token_response), Some(_token_ref)) => { |
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 are we ignoring this token_ref
? this should be set in payment method info right?
let filtered_nt_supported_connectors = | ||
get_filtered_nt_supported_connectors(&state, [connector.clone()].to_vec()); | ||
|
||
let is_nt_supported_connector_available = | ||
filtered_nt_supported_connectors.first().is_some(); |
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.
do no filter out. check only if the connector decided by routing is in the network tokenization supported connectors. this is because routing should always be prioritized over any feature. please remove this.
match pre_tokenization_response { | ||
(Some(token_response), Some(_token_ref)) => { | ||
let token_data = domain::NetworkTokenData { |
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.
since this is same logic, can you write this to a common function?
Type of Change
Description
Additional Changes
Motivation and Context
How did you test it?
Checklist
cargo +nightly fmt --all
cargo clippy