Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation
Rust adyenbeginner-friendlyfeaturedfinancefintechhacktoberfesthigh-performanceopen-sourceorchestrationpaymentpayment-gatewaypayment-integrationpayment-processingpaymentspayments-platformrestful-apirustsdkstripeworks-with-react
fix(connector): restrict preprocessing to only apple pay for paysafe (#9687)
Pa1NarK7f6bed3f8ee2
diff --git a/crates/router/src/core/payments.rs b/crates/router/src/core/payments.rsindex 5068ac7471..0b9f7de40d 100644--- a/crates/router/src/core/payments.rs+++ b/crates/router/src/core/payments.rs@@ -6631,11 +6631,14 @@ wherefalse,)} else if connector.connector_name == router_types::Connector::Paysafe {- router_data = router_data.preprocessing_steps(state, connector).await?;-- let is_error_in_response = router_data.response.is_err();- // If is_error_in_response is true, should_continue_payment should be false, we should throw the error- (router_data, !is_error_in_response)+ match payment_data.get_payment_method_data() {+ Some(domain::PaymentMethodData::Wallet(domain::WalletData::ApplePay(_))) => {+ router_data = router_data.preprocessing_steps(state, connector).await?;+ let is_error_in_response = router_data.response.is_err();+ (router_data, !is_error_in_response)+ }+ _ => (router_data, should_continue_payment),+ }} else {(router_data, should_continue_payment)}