mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-30 01:27:31 +08:00
feat(connector): [Bluesnap] Remove wallet call (#1620)
Co-authored-by: Sahkal Poddar <sahkal.poddar@juspay.in> Co-authored-by: Pa1NarK <69745008+pixincreate@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
f932d66c52
commit
ec35d55da6
@ -499,6 +499,7 @@ impl ConnectorIntegration<api::Capture, types::PaymentsCaptureData, types::Payme
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This session code is not used
|
||||||
impl api::PaymentSession for Bluesnap {}
|
impl api::PaymentSession for Bluesnap {}
|
||||||
|
|
||||||
impl ConnectorIntegration<api::Session, types::PaymentsSessionData, types::PaymentsResponseData>
|
impl ConnectorIntegration<api::Session, types::PaymentsSessionData, types::PaymentsResponseData>
|
||||||
|
|||||||
@ -388,8 +388,7 @@ where
|
|||||||
for (connector, payment_method_type, business_sub_label) in
|
for (connector, payment_method_type, business_sub_label) in
|
||||||
connector_and_supporting_payment_method_type
|
connector_and_supporting_payment_method_type
|
||||||
{
|
{
|
||||||
let connector_type =
|
let connector_type = api::GetToken::from(payment_method_type);
|
||||||
get_connector_type_for_session_token(payment_method_type, request, &connector);
|
|
||||||
if let Ok(connector_data) =
|
if let Ok(connector_data) =
|
||||||
api::ConnectorData::get_connector_by_name(connectors, &connector, connector_type)
|
api::ConnectorData::get_connector_by_name(connectors, &connector, connector_type)
|
||||||
.map_err(|err| {
|
.map_err(|err| {
|
||||||
@ -420,27 +419,3 @@ impl From<api_models::enums::PaymentMethodType> for api::GetToken {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_connector_type_for_session_token(
|
|
||||||
payment_method_type: api_models::enums::PaymentMethodType,
|
|
||||||
request: &api::PaymentsSessionRequest,
|
|
||||||
connector: &str,
|
|
||||||
) -> api::GetToken {
|
|
||||||
if payment_method_type == api_models::enums::PaymentMethodType::ApplePay {
|
|
||||||
if is_apple_pay_get_token_connector(connector, request) {
|
|
||||||
api::GetToken::Connector
|
|
||||||
} else {
|
|
||||||
api::GetToken::ApplePayMetadata
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
api::GetToken::from(payment_method_type)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn is_apple_pay_get_token_connector(
|
|
||||||
connector: &str,
|
|
||||||
_request: &api::PaymentsSessionRequest,
|
|
||||||
) -> bool {
|
|
||||||
// Add connectors here, which all are required to hit connector for session call
|
|
||||||
matches!(connector, "bluesnap")
|
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user