feat(connector): [CRYPTOPAY] Pass network details in payment request (#4779)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
DEEPANSHU BANSAL
2024-05-28 16:52:06 +05:30
committed by GitHub
parent d686ec7acd
commit 84e032e6c2
9 changed files with 30 additions and 3 deletions

View File

@ -285,6 +285,7 @@ pub enum BankRedirectData {
#[serde(rename_all = "snake_case")]
pub struct CryptoData {
pub pay_currency: Option<String>,
pub network: Option<String>,
}
#[derive(Debug, Clone, Eq, PartialEq, serde::Deserialize, serde::Serialize)]
@ -693,8 +694,14 @@ impl From<api_models::payments::BankRedirectData> for BankRedirectData {
impl From<api_models::payments::CryptoData> for CryptoData {
fn from(value: api_models::payments::CryptoData) -> Self {
let api_models::payments::CryptoData { pay_currency } = value;
Self { pay_currency }
let api_models::payments::CryptoData {
pay_currency,
network,
} = value;
Self {
pay_currency,
network,
}
}
}