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
refactor(connector): [bluesnap] add connector_txn_id fallback for webhook (#3315)
SamraatBansala69e876f8212
diff --git a/crates/router/src/connector/bluesnap.rs b/crates/router/src/connector/bluesnap.rsindex edcad00c98..e54d8320d0 100644--- a/crates/router/src/connector/bluesnap.rs+++ b/crates/router/src/connector/bluesnap.rs@@ -1043,11 +1043,19 @@ impl api::IncomingWebhook for Bluesnap {| bluesnap::BluesnapWebhookEvents::Charge| bluesnap::BluesnapWebhookEvents::Chargeback| bluesnap::BluesnapWebhookEvents::ChargebackStatusChanged => {- Ok(api_models::webhooks::ObjectReferenceId::PaymentId(- api_models::payments::PaymentIdType::PaymentAttemptId(- webhook_body.merchant_transaction_id,- ),- ))+ if webhook_body.merchant_transaction_id.is_empty() {+ Ok(api_models::webhooks::ObjectReferenceId::PaymentId(+ api_models::payments::PaymentIdType::ConnectorTransactionId(+ webhook_body.reference_number,+ ),+ ))+ } else {+ Ok(api_models::webhooks::ObjectReferenceId::PaymentId(+ api_models::payments::PaymentIdType::PaymentAttemptId(+ webhook_body.merchant_transaction_id,+ ),+ ))+ }}bluesnap::BluesnapWebhookEvents::Refund => {Ok(api_models::webhooks::ObjectReferenceId::RefundId(