feat(router): adding generic tokenization endpoint#7905
Merged
likhinbopanna merged 86 commits intomainfrom May 27, 2025
Merged
Conversation
2 tasks
tsdk02
previously approved these changes
May 22, 2025
maverox
previously approved these changes
May 22, 2025
tsdk02
previously approved these changes
May 22, 2025
prasunna09
previously approved these changes
May 22, 2025
|
|
||
| #[instrument(skip_all)] | ||
| #[cfg(all(feature = "v2", feature = "tokenization_v2"))] | ||
| pub async fn get_token_vault_core( |
Contributor
There was a problem hiding this comment.
nit: this name could be better.
ps: not able to get the functionality from the name.
Contributor
Author
There was a problem hiding this comment.
Can take up later when we'll use this for a handler fuction
jarnura
previously approved these changes
May 22, 2025
332f7f1
tsdk02
approved these changes
May 22, 2025
jarnura
approved these changes
May 22, 2025
prasunna09
approved these changes
May 22, 2025
| use error_stack::ResultExt; | ||
| #[cfg(all(feature = "v2", feature = "tokenization_v2"))] | ||
| use hyperswitch_domain_models; | ||
| #[cfg(all(feature = "v2", feature = "tokenization_v2"))] |
Contributor
There was a problem hiding this comment.
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, |
Contributor
There was a problem hiding this comment.
merchantContext has been introduced recently. we should use that ig
CC: @maverox
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
{ "id": "12345_tok_01966c6515157c3193db1c2502435ad5", "created_at": "2025-04-25 10:01:26.037519", "flag": "enabled" }Checklist
cargo +nightly fmt --allcargo clippy