mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 09:07:09 +08:00
fix(mandate): allow card details to be provided in case of network transaction id (#1138)
This commit is contained in:
@ -765,10 +765,18 @@ where
|
||||
{
|
||||
let connector = payment_data.payment_attempt.connector.to_owned();
|
||||
|
||||
let is_mandate = payment_data
|
||||
.mandate_id
|
||||
.as_ref()
|
||||
.and_then(|inner| inner.mandate_reference_id.as_ref())
|
||||
.map(|mandate_reference| match mandate_reference {
|
||||
api_models::payments::MandateReferenceId::ConnectorMandateId(_) => true,
|
||||
api_models::payments::MandateReferenceId::NetworkMandateId(_) => false,
|
||||
})
|
||||
.unwrap_or(false);
|
||||
|
||||
let payment_data_and_tokenization_action = match connector {
|
||||
Some(_) if payment_data.mandate_id.is_some() => {
|
||||
(payment_data, TokenizationAction::SkipConnectorTokenization)
|
||||
}
|
||||
Some(_) if is_mandate => (payment_data, TokenizationAction::SkipConnectorTokenization),
|
||||
Some(connector) if is_operation_confirm(&operation) => {
|
||||
let payment_method = &payment_data
|
||||
.payment_attempt
|
||||
|
||||
Reference in New Issue
Block a user