Skip to content

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

feat(connector): Fix Payload PSync headers handling (#11083)

awasthi2137308428e53c
diff --git a/crates/hyperswitch_connectors/src/connectors/payload.rs b/crates/hyperswitch_connectors/src/connectors/payload.rs
index 4a64beab95..a07e7275ef 100644
--- a/crates/hyperswitch_connectors/src/connectors/payload.rs
+++ b/crates/hyperswitch_connectors/src/connectors/payload.rs
@@ -452,9 +452,12 @@ impl ConnectorIntegration<PSync, PaymentsSyncData, PaymentsResponseData> for Pay
fn get_headers(
&self,
req: &PaymentsSyncRouterData,
- connectors: &Connectors,
+ _connectors: &Connectors,
) -> CustomResult<Vec<(String, masking::Maskable<String>)>, errors::ConnectorError> {
- self.build_headers(req, connectors)
+ let mut header = Vec::new();
+ let mut api_key = self.get_auth_header(&req.connector_auth_type)?;
+ header.append(&mut api_key);
+ Ok(header)
}
fn get_content_type(&self) -> &'static str {
@@ -961,6 +964,7 @@ static PAYLOAD_SUPPORTED_PAYMENT_METHODS: LazyLock<SupportedPaymentMethods> = La
common_enums::CardNetwork::Discover,
common_enums::CardNetwork::Mastercard,
common_enums::CardNetwork::Visa,
+ common_enums::CardNetwork::DinersClub,
];
payload_supported_payment_methods.add(