feat(connector): [Adyen] Add support for PIX Payment Method (#3236)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
Swangi Kumari
2024-01-25 12:41:54 +05:30
committed by GitHub
parent 3507ad60b2
commit fc6e68f7f0
7 changed files with 196 additions and 106 deletions

View File

@ -1892,8 +1892,12 @@ pub enum NextActionData {
/// Contains url for Qr code image, this qr code has to be shown in sdk
QrCodeInformation {
#[schema(value_type = String)]
image_data_url: Url,
/// Hyperswitch generated image data source url
image_data_url: Option<Url>,
display_to_timestamp: Option<i64>,
#[schema(value_type = String)]
/// The url for Qr code given by the connector
qr_code_url: Option<Url>,
},
/// Contains the download url and the reference number for transaction
DisplayVoucherInformation {
@ -1907,6 +1911,26 @@ pub enum NextActionData {
},
}
#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[serde(untagged)]
// the enum order shouldn't be changed as this is being used during serialization and deserialization
pub enum QrCodeInformation {
QrCodeUrl {
image_data_url: Url,
qr_code_url: Url,
display_to_timestamp: Option<i64>,
},
QrDataUrl {
image_data_url: Url,
display_to_timestamp: Option<i64>,
},
QrCodeImageUrl {
qr_code_url: Url,
display_to_timestamp: Option<i64>,
},
}
#[derive(Clone, Debug, Eq, PartialEq, serde::Serialize, serde::Deserialize, ToSchema)]
pub struct BankTransferNextStepsData {
/// The instructions for performing a bank transfer
@ -1932,6 +1956,7 @@ pub struct VoucherNextStepData {
pub struct QrCodeNextStepsInstruction {
pub image_data_url: Url,
pub display_to_timestamp: Option<i64>,
pub qr_code_url: Option<Url>,
}
#[derive(Clone, Debug, serde::Deserialize)]