Payment Attempt Domain Model (payments/payment_attempt.rs)

mperkins0155/hyperswitch · payments, domain, payment-attempt, model, validation, rust

Domain‑level struct for payment attempts with validation, encryption, and conversion logic, bridging API models and storage entities.

// Source: https://github.com/mperkins0155/hyperswitch | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
use std::str::FromStr;

#[cfg(feature = "v1")]
use api_models::enums::Connector;
#[cfg(feature = "v1")]
use api_models::payments::Amount;
#[cfg(feature = "v2")]
use api_models::payments::{additional_info::UpiAdditionalData, AdditionalPaymentData};
use common_enums as storage_enums;
#[cfg(feature = "v2")]
use common_types::payments as common_payments_types;
#[cfg(feature = "v1")]
use common_types::primitive_wrappers::{
    ExtendedAuthorizationAppliedBool, OvercaptureEnabledBool, RequestExtendedAuthorizationBool,
};
#[cfg(feature = "v2")]
use common_utils::ext_traits::Encode;
use 

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search 40K more like it.

Get a free API key