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
use scheduler::consumer::workflows::ProcessTrackerWorkflow;
use crate::{
core::offer_engine::notify, errors, logger::error, routes::SessionState, types::storage,
};
pub struct OfferEngineNotifyWorkflow;
#[async_trait::async_trait]
impl ProcessTrackerWorkflow<SessionState> for OfferEngineNotifyWorkflow {
async fn execute_workflow<'a>(
&'a self,
state: &'a SessionState,
process: storage::ProcessTracker,
) -> Result<(), errors::ProcessTrackerError> {
Box::pin(notify::execute_notification(state, process)).await
}
async fn error_handler<'a>(
&'a self,
_state: &'a SessionState,
process: storage::ProcessTracker,
_error: errors::ProcessTrackerError,
) -> errors::CustomResult<(), errors::ProcessTrackerError> {
error!(%process.id, "Failed while executing offer engine notify workflow");
Ok(())
}
}