feat(connector): [STRIPE] Added Connector Tokenization Flow for Cards (#8248)

Co-authored-by: Sayak Bhattacharya <sayak.b@Sayak-Bhattacharya-G092THXJ34.local>
This commit is contained in:
Sayak Bhattacharya
2025-06-07 19:46:13 +05:30
committed by GitHub
parent a88eebdec7
commit 8129260238
8 changed files with 223 additions and 131 deletions

View File

@ -3227,6 +3227,7 @@ async fn create_single_use_tokenization_flow(
browser_info: None,
currency: api_models::enums::Currency::default(),
amount: None,
split_payments: None,
};
let payment_method_session_address = types::PaymentAddress::new(

View File

@ -5241,6 +5241,7 @@ async fn decide_payment_method_tokenize_action(
state: &SessionState,
connector_name: &str,
payment_method: storage::enums::PaymentMethod,
payment_intent_data: payments::PaymentIntent,
pm_parent_token: Option<&str>,
is_connector_tokenization_enabled: bool,
apple_pay_flow: Option<domain::ApplePayFlow>,
@ -5276,6 +5277,11 @@ async fn decide_payment_method_tokenize_action(
}
}
}
} else if matches!(
payment_intent_data.split_payments,
Some(common_types::payments::SplitPaymentsRequest::StripeSplitPayment(_))
) {
Ok(TokenizationAction::TokenizeInConnector)
} else {
match pm_parent_token {
None => Ok(match (is_connector_tokenization_enabled, apple_pay_flow) {
@ -5445,6 +5451,7 @@ where
state,
&connector,
payment_method,
payment_data.get_payment_intent().clone(),
payment_data.get_token(),
is_connector_tokenization_enabled,
apple_pay_flow,