feat(payment-methods): create payment_token in vault confirm / do payment-confirm with temp token from session#8525
Merged
Gnanasundari24 merged 5 commits intomainfrom Jul 7, 2025
Merged
Conversation
Changed Files
|
jarnura
previously approved these changes
Jul 3, 2025
jarnura
approved these changes
Jul 3, 2025
su-shivanshmathur
approved these changes
Jul 4, 2025
prasunna09
reviewed
Jul 4, 2025
| #[serde(with = "common_utils::custom_serde::iso8601")] | ||
| pub expires_at: time::PrimitiveDateTime, | ||
| pub associated_payment_methods: Option<Vec<common_utils::id_type::GlobalPaymentMethodId>>, | ||
| pub associated_payment_methods: Option<Vec<String>>, |
Contributor
There was a problem hiding this comment.
we can have a type for this instead of string
| associated_payment_methods: Some(vec![parent_payment_method_token.clone()]) | ||
| }; | ||
|
|
||
| vault::insert_cvc_using_payment_token( |
Contributor
There was a problem hiding this comment.
Suggested change
| vault::insert_cvc_using_payment_token( | |
| vault::insert_cvc_using_payment_method_token( |
| .attach_printable("Failed to get redis connection")?; | ||
|
|
||
| let key = format!( | ||
| "pm_token_{}_{}_hyperswitch_cvc", |
Contributor
There was a problem hiding this comment.
Suggested change
| "pm_token_{}_{}_hyperswitch_cvc", | |
| "pm_token_{}_{}_card_cvc", |
|
|
||
| let payload = payload_to_be_encrypted | ||
| .encode_to_string_of_json() | ||
| .change_context(errors::ApiErrorResponse::InternalServerError)?; |
Contributor
There was a problem hiding this comment.
please add attach printable
| Some(fullfillment_time), | ||
| ) | ||
| .await | ||
| .change_context(errors::StorageError::KVError) |
Contributor
There was a problem hiding this comment.
is this change_context needed?
| .attach_printable("Failed to get redis connection")?; | ||
|
|
||
| let key = format!( | ||
| "pm_token_{}_{}_hyperswitch_cvc", |
Contributor
There was a problem hiding this comment.
Suggested change
| "pm_token_{}_{}_hyperswitch_cvc", | |
| "pm_token_{}_{}_card_cvc", |
Contributor
Author
|
would be addressing these nits in a separate pr 👍 |
pixincreate
added a commit
that referenced
this pull request
Jul 9, 2025
…ayload-webhooks * 'main' of github.com:juspay/hyperswitch: refactor(connector): Move connector mappings and endpoints to dedicated modules (#8562) ci(cypress): fix `hipay` test cases (#8563) chore(version): 2025.07.09.0 fix(payment_method): update entity id used for Vault to global customer id (#8380) refactor(routing): add conditional check for invoking DE routing flows (#8559) feat(connector): [AUTHIPAY] Integrate cards non 3ds payments (#8266) ci(cypress): add payu connector (#8567) feat(connector): [silverflow] template code (#8553) chore(version): 2025.07.08.0 feat(cypress): [worldpayvantiv] add cypress test (#8234) feat(connectors): [worldpayvantiv] add connector mandate support (#8546) feat(connector): [Celero] add Connector Template Code (#8489) feat(payment-methods): create payment_token in vault confirm / do payment-confirm with temp token from session (#8525) ci(cypress): Add Tsys,Square cypress test (#8543) chore(version): 2025.07.07.0
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
Additional Changes
payment token are present in payment method session response
Motivation and Context
How did you test it?
Tested through Postman (Hyperswitch v2):
Create a customer:
Create an Payment Intent:
Create a Payment Method Session:
Confirm the session and collect the payment_method_token from associated_payment_methods:
Confirm the payment with the payment_method_token:
Checklist
cargo +nightly fmt --allcargo clippy