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): [Volt] Fix status mapping for Volt (#3915)
Swangi Kumarif132527490a7
diff --git a/crates/router/src/connector/volt/transformers.rs b/crates/router/src/connector/volt/transformers.rsindex ccb482d5b7..b7c9a6826c 100644--- a/crates/router/src/connector/volt/transformers.rs+++ b/crates/router/src/connector/volt/transformers.rs@@ -240,10 +240,8 @@ impl TryFrom<&types::ConnectorAuthType> for VoltAuthType {impl From<VoltPaymentStatus> for enums::AttemptStatus {fn from(item: VoltPaymentStatus) -> Self {match item {- VoltPaymentStatus::Completed- | VoltPaymentStatus::Received- | VoltPaymentStatus::Settled => Self::Charged,- VoltPaymentStatus::DelayedAtBank => Self::Pending,+ VoltPaymentStatus::Received | VoltPaymentStatus::Settled => Self::Charged,+ VoltPaymentStatus::Completed | VoltPaymentStatus::DelayedAtBank => Self::Pending,VoltPaymentStatus::NewPayment| VoltPaymentStatus::BankRedirect| VoltPaymentStatus::AwaitingCheckoutAuthorisation => Self::AuthenticationPending,@@ -421,13 +419,13 @@ impl<F, T>impl From<VoltWebhookPaymentStatus> for enums::AttemptStatus {fn from(status: VoltWebhookPaymentStatus) -> Self {match status {- VoltWebhookPaymentStatus::Completed | VoltWebhookPaymentStatus::Received => {- Self::Charged- }+ VoltWebhookPaymentStatus::Received => Self::Charged,VoltWebhookPaymentStatus::Failed | VoltWebhookPaymentStatus::NotReceived => {Self::Failure}- VoltWebhookPaymentStatus::Pending => Self::Pending,+ VoltWebhookPaymentStatus::Completed | VoltWebhookPaymentStatus::Pending => {+ Self::Pending+ }}}}@@ -577,13 +575,13 @@ impl From<VoltWebhookBodyEventType> for api::IncomingWebhookEvent {fn from(status: VoltWebhookBodyEventType) -> Self {match status {VoltWebhookBodyEventType::Payment(payment_data) => match payment_data.status {- VoltWebhookPaymentStatus::Completed | VoltWebhookPaymentStatus::Received => {- Self::PaymentIntentSuccess- }+ VoltWebhookPaymentStatus::Received => Self::PaymentIntentSuccess,VoltWebhookPaymentStatus::Failed | VoltWebhookPaymentStatus::NotReceived => {Self::PaymentIntentFailure}- VoltWebhookPaymentStatus::Pending => Self::PaymentIntentProcessing,+ VoltWebhookPaymentStatus::Completed | VoltWebhookPaymentStatus::Pending => {+ Self::PaymentIntentProcessing+ }},VoltWebhookBodyEventType::Refund(refund_data) => match refund_data.status {VoltWebhookRefundsStatus::RefundConfirmed => Self::RefundSuccess,