mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-02 04:04:43 +08:00
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:
committed by
GitHub
parent
a88eebdec7
commit
8129260238
@ -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(
|
||||
|
||||
@ -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,
|
||||
|
||||
Reference in New Issue
Block a user