Payment Response Transformers (payments/transformers.rs)

mperkins0155/hyperswitch · payments, rust, transformer, response, next-action

Transforms internal payment models into API response formats and determines next‑action steps for various payment methods and revenue recovery intents.

// 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::{fmt::Debug, marker::PhantomData, str::FromStr};

#[cfg(feature = "v2")]
use api_models::enums as api_enums;
#[cfg(feature = "v1")]
use api_models::payments as api_payments;
#[cfg(feature = "v2")]
use api_models::payments::RevenueRecoveryGetIntentResponse;
use api_models::payments::{
    Address, CustomerDetails, CustomerDetailsResponse, FrmMessage, NetworkDetails,
    RequestSurchargeDetails,
};
use common_enums::{Currency, MerchantAccountType, RequestIncrementalAuthorization};
#[cfg(feature = "v1")]
use common_utils::{
    consts::X_HS_LATENCY,
    fp_utils, pii,
    t

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

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

Get a free API key