mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-01 11:06:50 +08:00
fix(router): conditionally store saved cards with cvc in temp locker based on config (#7773)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -2637,6 +2637,21 @@ pub async fn make_pm_data<'a, F: Clone, R, D>(
|
|||||||
if let Some(vault_operation) = updated_vault_operation {
|
if let Some(vault_operation) = updated_vault_operation {
|
||||||
payment_data.set_vault_operation(vault_operation);
|
payment_data.set_vault_operation(vault_operation);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Temporarily store payment method data along with the cvc in redis for saved card payments, if required by the connector based on its configs
|
||||||
|
if payment_data.token.is_none() {
|
||||||
|
let (_, payment_token) = payment_methods::retrieve_payment_method_core(
|
||||||
|
&Some(payment_method_data.clone()),
|
||||||
|
state,
|
||||||
|
&payment_data.payment_intent,
|
||||||
|
&payment_data.payment_attempt,
|
||||||
|
merchant_key_store,
|
||||||
|
Some(business_profile),
|
||||||
|
)
|
||||||
|
.await?;
|
||||||
|
|
||||||
|
payment_data.token = payment_token;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
Ok::<_, error_stack::Report<errors::ApiErrorResponse>>(
|
Ok::<_, error_stack::Report<errors::ApiErrorResponse>>(
|
||||||
|
|||||||
Reference in New Issue
Block a user