-
Notifications
You must be signed in to change notification settings - Fork 3.9k
feat(router): adding generic tokenization endpoint #7905
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
Conversation
|
||
#[instrument(skip_all)] | ||
#[cfg(all(feature = "v2", feature = "tokenization_v2"))] | ||
pub async fn get_token_vault_core( |
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: this name could be better.
ps: not able to get the functionality from the 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.
Can take up later when we'll use this for a handler fuction
332f7f1
use error_stack::ResultExt; | ||
#[cfg(all(feature = "v2", feature = "tokenization_v2"))] | ||
use hyperswitch_domain_models; | ||
#[cfg(all(feature = "v2", feature = "tokenization_v2"))] |
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: instead of having this on every import n method, this can be moved to parent level. core.rs in the same crate.
|state, auth: auth::AuthenticationData, request, _| async move { | ||
tokenization::create_vault_token_core( | ||
state, | ||
&auth.merchant_account, |
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.
merchantContext has been introduced recently. we should use that ig
CC: @maverox
Type of Change
Description
Create a new set of endpoints for giving tokenization as a service for generic usage, current motivation of the service is to be used in proxy payment service.
Additional Changes
Motivation and Context
How did you test it?
Create a token
Response
Checklist
cargo +nightly fmt --all
cargo clippy