feat(payment-methods): [Proxy] add saved card flow for proxy payments#8964
feat(payment-methods): [Proxy] add saved card flow for proxy payments#8964bernard-eugine merged 48 commits intomainfrom
Conversation
…h into add-confirm-proxy-flow
crates/router/src/core/payments/operations/external_vault_proxy_payment_intent.rs
Outdated
Show resolved
Hide resolved
| let payment_method_id = common_utils::id_type::GlobalPaymentMethodId::generate( | ||
| &state.conf.cell_information.id, | ||
| ) |
There was a problem hiding this comment.
do not generate pm id in payments service. this should be handled by pm service only
| pub struct ProxyCardDetails { | ||
| /// Tokenized Card Number | ||
| #[schema(value_type = String,example = "4111111145551142")] | ||
| pub card_number: masking::Secret<String>, |
There was a problem hiding this comment.
we ll have to ensure actual card raw num is not stored in pm entry.
may be we can do a luhn check before storing in pm table?
There was a problem hiding this comment.
Im taking it in a separate pr
| payment_data.payment_attempt.customer_acceptance.is_some(), | ||
| payment_data.payment_attempt.payment_method_id.clone(), | ||
| ) { | ||
| payment_methods::update_payment_method_status_internal( |
There was a problem hiding this comment.
We ll have to introduce a new endpoint to activate the pm for internal use, instead payments directly calling update fn
There was a problem hiding this comment.
Created a issue that could be picked up https://github.com/juspay/hyperswitch-cloud/issues/10702
..._migrations/2025-07-29-080133_add-external_vault_token_data-column-to-payment-methods/up.sql
Outdated
Show resolved
Hide resolved
| } | ||
|
|
||
| pub fn is_success(self) -> bool { | ||
| matches!(self, Self::Charged | Self::PartialCharged) |
There was a problem hiding this comment.
we should update payment method to active if Authentication is successful and other successful status. Even in psync flow, the update payment method should happen
We can pick this up in a seperate pr.
Type of Change
Description
Add saved card flow for proxy payments:
Additional Changes
First payment to save card in
confirm-intent/external-vault-proxy:Subsequent payment with saved card in
confirm-intent/external-vault-proxy:Motivation and Context
How did you test it?
This PR is dependent in proxy module. Need the whole module to be present for testing.
Checklist
cargo +nightly fmt --allcargo clippy