Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions config/deployments/integration_test.toml
Original file line number Diff line number Diff line change
Expand Up @@ -267,9 +267,9 @@ bank_debit.sepa = { connector_list = "gocardless,adyen,stripe,deutschebank" }
card.credit.connector_list = "aci,checkout,stripe,adyen,zift,authorizedotnet,cybersource,datatrans,globalpay,worldpay,multisafepay,nmi,nexinets,noon,bankofamerica,braintree,nuvei,payme,wellsfargo,bamboraapac,elavon,fiuu,nexixpay,novalnet,paybox,paypal,xendit,moneris,archipel,worldpayvantiv,payload,paysafe,finix,tesouro,mollie,airwallex,peachpayments,fiservcommercehub,imerchantsolutions,givepayments"
card.debit.connector_list = "aci,checkout,stripe,adyen,zift,authorizedotnet,cybersource,datatrans,globalpay,worldpay,multisafepay,nmi,nexinets,noon,bankofamerica,braintree,nuvei,payme,wellsfargo,bamboraapac,elavon,fiuu,nexixpay,novalnet,paybox,paypal,xendit,moneris,archipel,worldpayvantiv,payload,paysafe,finix,tesouro,mollie,airwallex,peachpayments,fiservcommercehub,imerchantsolutions,givepayments"
pay_later.klarna.connector_list = "adyen,aci"
wallet.apple_pay.connector_list = "aci,checkout,stripe,adyen,braintree,cybersource,noon,bankofamerica,nexinets,novalnet,nuvei,authorizedotnet,wellsfargo,finix,nmi,tesouro,worldpaymodular,worldpayxml,payme,imerchantsolutions"
wallet.apple_pay.connector_list = "aci,checkout,stripe,adyen,braintree,cybersource,noon,bankofamerica,nexinets,novalnet,nuvei,authorizedotnet,wellsfargo,finix,nmi,tesouro,worldpaymodular,worldpayxml,payme,imerchantsolutions,paysafe"
wallet.samsung_pay.connector_list = "aci,cybersource"
wallet.google_pay.connector_list = "aci,checkout,stripe,adyen,cybersource,bankofamerica,noon,globalpay,multisafepay,novalnet,nuvei,authorizedotnet,wellsfargo,finix,nmi,tesouro,worldpaymodular,worldpayxml,imerchantsolutions"
wallet.google_pay.connector_list = "aci,checkout,stripe,adyen,cybersource,bankofamerica,noon,globalpay,multisafepay,novalnet,nuvei,authorizedotnet,wellsfargo,finix,nmi,tesouro,worldpaymodular,worldpayxml,imerchantsolutions,paysafe"
wallet.paypal.connector_list = "adyen,globalpay,nexinets,novalnet,paypal,authorizedotnet"
wallet.momo.connector_list = "adyen"
wallet.kakao_pay.connector_list = "adyen"
Expand Down Expand Up @@ -983,7 +983,7 @@ billwerk = {long_lived_token = false, payment_method = "card"}
globalpay = { long_lived_token = false, payment_method = "card", flow = "mandates" }
dwolla = { long_lived_token = true, payment_method = "bank_debit" }
finix= { long_lived_token = false, payment_method = "card,wallet" }
paysafe= { long_lived_token = false, payment_method = "card,wallet" ,payment_method_type = { type = "enable_only", list = "apple_pay,credit,debit"},allowed_card_authentication_type= "no_three_ds"}
paysafe= { long_lived_token = false, payment_method = "card,wallet" ,payment_method_type = { type = "enable_only", list = "apple_pay,google_pay,credit,debit"},allowed_card_authentication_type= "no_three_ds", apple_pay_pre_decrypt_flow = "connector_tokenization", google_pay_pre_decrypt_flow = "connector_tokenization"}

[webhooks]
outgoing_enabled = true
Expand Down Expand Up @@ -1030,7 +1030,7 @@ connector_list = "juspaythreedsserver, ctp_mastercard, ctp_visa"
connector_list = "worldpayvantiv"

[grpc_client.unified_connector_service]
ucs_only_connectors = "imerchantsolutions, paytm, phonepe, hyperpg, revolv3, fiservcommercehub, absa_sanlam, interpayments, payconex, dlocal, barclaycard, tsys_transit, jpmorgan, datatrans, givepayments" # Comma-separated list of connectors that use UCS only
ucs_only_connectors = "imerchantsolutions, paytm, phonepe, hyperpg, revolv3, fiservcommercehub, absa_sanlam, interpayments, payconex, dlocal, barclaycard, tsys_transit, jpmorgan, datatrans, givepayments, paysafe" # Comma-separated list of connectors that use UCS only
ucs_psync_disabled_connectors = "cashtocode, trustly" # Comma-separated list of connectors to disable UCS PSync call

# Merchant Advice Code Configuration
Expand Down
8 changes: 4 additions & 4 deletions config/deployments/production.toml
Original file line number Diff line number Diff line change
Expand Up @@ -267,9 +267,9 @@ bank_debit.sepa = { connector_list = "gocardless,adyen,stripe,deutschebank" }
card.credit.connector_list = "aci,checkout,stripe,zift,adyen,authorizedotnet,cybersource,datatrans,globalpay,worldpay,multisafepay,nmi,nexinets,noon,bankofamerica,braintree,nuvei,payme,wellsfargo,bamboraapac,elavon,fiuu,nexixpay,novalnet,paybox,paypal,xendit,moneris,archipel,worldpayvantiv,payload,paysafe,finix,tesouro,mollie,airwallex,peachpayments,fiservcommercehub,imerchantsolutions,givepayments"
card.debit.connector_list = "aci,checkout,stripe,zift,adyen,authorizedotnet,cybersource,datatrans,globalpay,worldpay,multisafepay,nmi,nexinets,noon,bankofamerica,braintree,nuvei,payme,wellsfargo,bamboraapac,elavon,fiuu,nexixpay,novalnet,paybox,paypal,xendit,moneris,archipel,worldpayvantiv,payload,paysafe,finix,tesouro,mollie,airwallex,peachpayments,fiservcommercehub,imerchantsolutions,givepayments"
pay_later.klarna.connector_list = "adyen,aci"
wallet.apple_pay.connector_list = "aci,checkout,stripe,adyen,braintree,cybersource,noon,bankofamerica,nuvei,nexinets,novalnet,authorizedotnet,wellsfargo,worldpayvantiv,finix,nmi,tesouro,worldpaymodular,worldpayxml,payme,imerchantsolutions"
wallet.apple_pay.connector_list = "aci,checkout,stripe,adyen,braintree,cybersource,noon,bankofamerica,nuvei,nexinets,novalnet,authorizedotnet,wellsfargo,worldpayvantiv,finix,nmi,tesouro,worldpaymodular,worldpayxml,payme,imerchantsolutions,paysafe"
wallet.samsung_pay.connector_list = "aci,cybersource"
wallet.google_pay.connector_list = "aci,checkout,stripe,adyen,cybersource,bankofamerica,noon,globalpay,multisafepay,novalnet,nuvei,authorizedotnet,wellsfargo,worldpayvantiv,finix,nmi,tesouro,worldpaymodular,worldpayxml,imerchantsolutions"
wallet.google_pay.connector_list = "aci,checkout,stripe,adyen,cybersource,bankofamerica,noon,globalpay,multisafepay,novalnet,nuvei,authorizedotnet,wellsfargo,worldpayvantiv,finix,nmi,tesouro,worldpaymodular,worldpayxml,imerchantsolutions,paysafe"
wallet.paypal.connector_list = "adyen,globalpay,nexinets,novalnet,paypal,authorizedotnet"
wallet.momo.connector_list = "adyen"
wallet.kakao_pay.connector_list = "adyen"
Expand Down Expand Up @@ -994,7 +994,7 @@ billwerk = {long_lived_token = false, payment_method = "card"}
globalpay = { long_lived_token = false, payment_method = "card", flow = "mandates" }
dwolla = { long_lived_token = true, payment_method = "bank_debit" }
finix= { long_lived_token = false, payment_method = "card,wallet" }
paysafe= { long_lived_token = false, payment_method = "card,wallet" ,payment_method_type = { type = "enable_only", list = "apple_pay,credit,debit"},allowed_card_authentication_type= "no_three_ds"}
paysafe= { long_lived_token = false, payment_method = "card,wallet" ,payment_method_type = { type = "enable_only", list = "apple_pay,google_pay,credit,debit"},allowed_card_authentication_type= "no_three_ds", apple_pay_pre_decrypt_flow = "connector_tokenization", google_pay_pre_decrypt_flow = "connector_tokenization"}

[webhooks]
outgoing_enabled = true
Expand Down Expand Up @@ -1038,7 +1038,7 @@ click_to_pay = {connector_list = "adyen, cybersource, trustpay"}
connector_list = "juspaythreedsserver, ctp_mastercard, ctp_visa"

[grpc_client.unified_connector_service]
ucs_only_connectors = "imerchantsolutions, paytm, phonepe, hyperpg, revolv3, fiservcommercehub, absa_sanlam, interpayments, payconex, dlocal, barclaycard, jpmorgan, datatrans, tsys_transit, givepayments" # Comma-separated list of connectors that use UCS only
ucs_only_connectors = "imerchantsolutions, paytm, phonepe, hyperpg, revolv3, fiservcommercehub, absa_sanlam, interpayments, payconex, dlocal, barclaycard, jpmorgan, datatrans, tsys_transit, givepayments, paysafe" # Comma-separated list of connectors that use UCS only
ucs_psync_disabled_connectors = "cashtocode, trustly" # Comma-separated list of connectors to disable UCS PSync call

# Merchant Advice Code Configuration
Expand Down
8 changes: 4 additions & 4 deletions config/deployments/sandbox.toml
Original file line number Diff line number Diff line change
Expand Up @@ -274,9 +274,9 @@ bank_debit.sepa = { connector_list = "gocardless,adyen,stripe,deutschebank" }
card.credit.connector_list = "aci,checkout,stripe,adyen,authorizedotnet,cybersource,datatrans,globalpay,worldpay,multisafepay,nmi,nexinets,noon,bankofamerica,braintree,nuvei,payme,wellsfargo,bamboraapac,elavon,fiuu,nexixpay,novalnet,paybox,paypal,xendit,moneris,archipel,worldpayvantiv,payload,paysafe,finix,tesouro,mollie,airwallex,peachpayments,fiservcommercehub,imerchantsolutions,givepayments"
card.debit.connector_list = "aci,checkout,stripe,adyen,authorizedotnet,cybersource,datatrans,globalpay,worldpay,multisafepay,nmi,nexinets,noon,bankofamerica,braintree,nuvei,payme,wellsfargo,bamboraapac,elavon,fiuu,nexixpay,novalnet,paybox,paypal,xendit,moneris,archipel,worldpayvantiv,payload,paysafe,finix,tesouro,mollie,airwallex,peachpayments,fiservcommercehub,imerchantsolutions,givepayments"
pay_later.klarna.connector_list = "adyen,aci"
wallet.apple_pay.connector_list = "aci,checkout,stripe,adyen,braintree,cybersource,noon,bankofamerica,nexinets,novalnet,nuvei,authorizedotnet,wellsfargo,worldpaymodular,worldpayvantiv,finix,nmi,tesouro,worldpayxml,payme,imerchantsolutions"
wallet.apple_pay.connector_list = "aci,checkout,stripe,adyen,braintree,cybersource,noon,bankofamerica,nexinets,novalnet,nuvei,authorizedotnet,wellsfargo,worldpaymodular,worldpayvantiv,finix,nmi,tesouro,worldpayxml,payme,imerchantsolutions,paysafe"
wallet.samsung_pay.connector_list = "aci,cybersource"
wallet.google_pay.connector_list = "aci,checkout,stripe,adyen,cybersource,bankofamerica,noon,globalpay,multisafepay,novalnet,nuvei,authorizedotnet,wellsfargo,worldpaymodular,worldpayvantiv,finix,nmi,tesouro,worldpayxml,imerchantsolutions"
wallet.google_pay.connector_list = "aci,checkout,stripe,adyen,cybersource,bankofamerica,noon,globalpay,multisafepay,novalnet,nuvei,authorizedotnet,wellsfargo,worldpaymodular,worldpayvantiv,finix,nmi,tesouro,worldpayxml,imerchantsolutions,paysafe"
wallet.paypal.connector_list = "adyen,globalpay,nexinets,novalnet,paypal,authorizedotnet"
wallet.momo.connector_list = "adyen"
wallet.kakao_pay.connector_list = "adyen"
Expand Down Expand Up @@ -1002,7 +1002,7 @@ billwerk = {long_lived_token = false, payment_method = "card"}
globalpay = { long_lived_token = false, payment_method = "card", flow = "mandates" }
dwolla = { long_lived_token = true, payment_method = "bank_debit" }
finix= { long_lived_token = false, payment_method = "card,wallet" }
paysafe= { long_lived_token = false, payment_method = "card,wallet" ,payment_method_type = { type = "enable_only", list = "apple_pay,credit,debit"},allowed_card_authentication_type= "no_three_ds"}
paysafe= { long_lived_token = false, payment_method = "card,wallet" ,payment_method_type = { type = "enable_only", list = "apple_pay,google_pay,credit,debit"},allowed_card_authentication_type= "no_three_ds", apple_pay_pre_decrypt_flow = "connector_tokenization", google_pay_pre_decrypt_flow = "connector_tokenization"}

[webhooks]
outgoing_enabled = true
Expand Down Expand Up @@ -1049,7 +1049,7 @@ connector_list = "juspaythreedsserver, ctp_mastercard, ctp_visa"
connector_list = "worldpayvantiv"

[grpc_client.unified_connector_service]
ucs_only_connectors = "imerchantsolutions, paytm, phonepe, hyperpg, revolv3, fiservcommercehub, absa_sanlam, interpayments, payconex, dlocal, barclaycard, jpmorgan, datatrans, tsys_transit, givepayments" # Comma-separated list of connectors that use UCS only
ucs_only_connectors = "imerchantsolutions, paytm, phonepe, hyperpg, revolv3, fiservcommercehub, absa_sanlam, interpayments, payconex, dlocal, barclaycard, jpmorgan, datatrans, tsys_transit, givepayments, paysafe" # Comma-separated list of connectors that use UCS only
ucs_psync_disabled_connectors = "cashtocode, trustly" # Comma-separated list of connectors to disable UCS PSync call

# Merchant Advice Code Configuration
Expand Down
8 changes: 4 additions & 4 deletions config/development.toml
Original file line number Diff line number Diff line change
Expand Up @@ -1189,7 +1189,7 @@ billwerk = { long_lived_token = false, payment_method = "card" }
dwolla = { long_lived_token = true, payment_method = "bank_debit" }
globalpay = { long_lived_token = false, payment_method = "card", flow = "mandates" }
finix= { long_lived_token = false, payment_method = "card,wallet" }
paysafe= { long_lived_token = false, payment_method = "card,wallet" ,payment_method_type = { type = "enable_only", list = "apple_pay,credit,debit"},allowed_card_authentication_type= "no_three_ds"}
paysafe= { long_lived_token = false, payment_method = "card,wallet" ,payment_method_type = { type = "enable_only", list = "apple_pay,google_pay,credit,debit"},allowed_card_authentication_type= "no_three_ds", apple_pay_pre_decrypt_flow = "connector_tokenization", google_pay_pre_decrypt_flow = "connector_tokenization"}

[temp_locker_enable_config]
stripe = { payment_method = "bank_transfer" }
Expand Down Expand Up @@ -1281,9 +1281,9 @@ bank_debit.sepa = { connector_list = "gocardless,adyen,stripe,deutschebank" }
card.credit.connector_list = "aci,checkout,stripe,adyen,zift,authorizedotnet,cybersource,datatrans,globalpay,worldpay,multisafepay,nmi,nexinets,noon,bankofamerica,braintree,nuvei,payme,wellsfargo,bamboraapac,elavon,fiuu,nexixpay,novalnet,paybox,paypal,xendit,moneris,archipel,worldpayvantiv,payload,paysafe,finix,tesouro,mollie,airwallex,peachpayments,fiservcommercehub,imerchantsolutions,givepayments"
card.debit.connector_list = "aci,checkout,stripe,adyen,zift,authorizedotnet,cybersource,datatrans,globalpay,worldpay,multisafepay,nmi,nexinets,noon,bankofamerica,braintree,nuvei,payme,wellsfargo,bamboraapac,elavon,fiuu,nexixpay,novalnet,paybox,paypal,xendit,moneris,archipel,worldpayvantiv,payload,paysafe,finix,tesouro,mollie,airwallex,peachpayments,fiservcommercehub,imerchantsolutions,givepayments"
pay_later.klarna.connector_list = "adyen,aci"
wallet.apple_pay.connector_list = "aci,checkout,stripe,adyen,braintree,cybersource,noon,bankofamerica,nuvei,nexinets,novalnet,authorizedotnet,wellsfargo,worldpayvantiv,finix,nmi,tesouro,worldpaymodular,worldpayxml,payme,imerchantsolutions,datatrans"
wallet.apple_pay.connector_list = "aci,checkout,stripe,adyen,braintree,cybersource,noon,bankofamerica,nuvei,nexinets,novalnet,authorizedotnet,wellsfargo,worldpayvantiv,finix,nmi,tesouro,worldpaymodular,worldpayxml,payme,imerchantsolutions,datatrans,paysafe"
wallet.samsung_pay.connector_list = "aci,cybersource"
wallet.google_pay.connector_list = "aci,checkout,stripe,adyen,cybersource,bankofamerica,noon,globalpay,multisafepay,novalnet,nuvei,authorizedotnet,wellsfargo,worldpayvantiv,finix,nmi,tesouro,worldpaymodular,worldpayxml,imerchantsolutions,datatrans"
wallet.google_pay.connector_list = "aci,checkout,stripe,adyen,cybersource,bankofamerica,noon,globalpay,multisafepay,novalnet,nuvei,authorizedotnet,wellsfargo,worldpayvantiv,finix,nmi,tesouro,worldpaymodular,worldpayxml,imerchantsolutions,datatrans,paysafe"
wallet.paypal.connector_list = "adyen,globalpay,nexinets,novalnet,paypal,authorizedotnet"
wallet.momo.connector_list = "adyen"
wallet.kakao_pay.connector_list = "adyen"
Expand Down Expand Up @@ -1568,7 +1568,7 @@ enabled = "true"
base_url = "http://localhost:8000"
connection_timeout = 10
request_timeout = 35
ucs_only_connectors = "imerchantsolutions, paytm, phonepe, hyperpg, revolv3, fiservcommercehub, absa_sanlam, interpayments, payconex, dlocal, barclaycard, tsys_transit, jpmorgan, datatrans, givepayments" # Comma-separated list of connectors that use UCS only
ucs_only_connectors = "imerchantsolutions, paytm, phonepe, hyperpg, revolv3, fiservcommercehub, absa_sanlam, interpayments, payconex, dlocal, barclaycard, tsys_transit, jpmorgan, datatrans, givepayments, paysafe" # Comma-separated list of connectors that use UCS only
ucs_psync_disabled_connectors = "cashtocode, trustly" # Comma-separated list of connectors to disable UCS PSync call

[revenue_recovery]
Expand Down
2 changes: 1 addition & 1 deletion config/docker_compose.toml
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ billwerk = { long_lived_token = false, payment_method = "card" }
globalpay = { long_lived_token = false, payment_method = "card", flow = "mandates" }
dwolla = { long_lived_token = true, payment_method = "bank_debit" }
finix= { long_lived_token = false, payment_method = "card,wallet" }
paysafe= { long_lived_token = false, payment_method = "card,wallet" ,payment_method_type = { type = "enable_only", list = "apple_pay,credit,debit"},allowed_card_authentication_type= "no_three_ds"}
paysafe= { long_lived_token = false, payment_method = "card,wallet" ,payment_method_type = { type = "enable_only", list = "apple_pay,google_pay,credit,debit"},allowed_card_authentication_type= "no_three_ds", apple_pay_pre_decrypt_flow = "connector_tokenization", google_pay_pre_decrypt_flow = "connector_tokenization"}

[temp_locker_enable_config]
stripe = { payment_method = "bank_transfer" }
Expand Down
27 changes: 25 additions & 2 deletions crates/hyperswitch_connectors/src/connectors/paysafe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1409,10 +1409,13 @@ impl ConnectorSpecifications for Paysafe {
payment_attempt.setup_future_usage_applied,
Some(enums::FutureUsage::OffSession)
) && payment_attempt.customer_acceptance.is_some()
&& matches!(
&& (matches!(
payment_attempt.payment_method,
Some(enums::PaymentMethod::Card)
)
) || matches!(
payment_attempt.payment_method_type,
Some(enums::PaymentMethodType::ApplePay | enums::PaymentMethodType::GooglePay)
))
&& matches!(
payment_attempt.authentication_type,
Some(enums::AuthenticationType::NoThreeDs) | None
Expand All @@ -1423,4 +1426,24 @@ impl ConnectorSpecifications for Paysafe {
api::ConnectorCustomerAction::NoAction
}
}

// Paysafe's customer vault rejects raw applePay/googlePay payloads. After a
// successful wallet CIT spends the SINGLE_USE handle, convert that handle
// through paymentHandleTokenFrom and persist the returned MULTI_USE handle
// for later MITs.
fn requires_wallet_vault_conversion(
&self,
tokenization_data: &PaymentMethodTokenizationData,
has_connector_customer: bool,
) -> bool {
use hyperswitch_domain_models::payment_method_data::{PaymentMethodData, WalletData};

matches!(
tokenization_data.payment_method_data,
PaymentMethodData::Wallet(WalletData::ApplePay(_) | WalletData::GooglePay(_))
) && tokenization_data.setup_future_usage == Some(enums::FutureUsage::OffSession)
&& (tokenization_data.customer_acceptance.is_some()
|| tokenization_data.setup_mandate_details.is_some())
&& has_connector_customer
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,11 @@ pub struct PaymentMethodTokenizationData {
pub mandate_id: Option<mandates::MandateIds>,
pub router_return_url: Option<String>,
pub capture_method: Option<storage_enums::CaptureMethod>,
/// Opaque per-connector data forwarded on the tokenize request. Core sets
/// this when it sequences a connector's second, vault-conversion tokenize
/// pass (e.g. the leg-1 payment-handle token that pass consumes), so the
/// connector gateway stays a single granular call.
pub connector_feature_data: Option<Secret<String>>,
}

impl TryFrom<SetupMandateRequestData> for PaymentMethodTokenizationData {
Expand All @@ -596,6 +601,7 @@ impl TryFrom<SetupMandateRequestData> for PaymentMethodTokenizationData {
payment_method_type: data.payment_method_type,
router_return_url: data.router_return_url,
capture_method: data.capture_method,
connector_feature_data: None,
})
}
}
Expand All @@ -618,6 +624,7 @@ impl<F> From<&RouterData<F, PaymentsAuthorizeData, response_types::PaymentsRespo
payment_method_type: data.payment_method_type,
router_return_url: None,
capture_method: None,
connector_feature_data: None,
}
}
}
Expand All @@ -639,6 +646,7 @@ impl TryFrom<PaymentsAuthorizeData> for PaymentMethodTokenizationData {
payment_method_type: data.payment_method_type,
router_return_url: data.router_return_url,
capture_method: data.capture_method,
connector_feature_data: None,
})
}
}
Expand All @@ -665,6 +673,7 @@ impl TryFrom<CompleteAuthorizeData> for PaymentMethodTokenizationData {
payment_method_type: data.payment_method_type,
router_return_url: data.router_return_url,
capture_method: data.capture_method,
connector_feature_data: None,
})
}
}
Expand Down
Loading
Loading