mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-28 20:23:43 +08:00
feat(connector): [BHN] Add BHN GiftCard Flow( Alpha) (#8701)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -3024,6 +3024,7 @@ impl GetPaymentMethodType for GiftCardData {
|
||||
match self {
|
||||
Self::Givex(_) => api_enums::PaymentMethodType::Givex,
|
||||
Self::PaySafeCard {} => api_enums::PaymentMethodType::PaySafeCard,
|
||||
Self::BhnCardNetwork(_) => api_enums::PaymentMethodType::BhnCardNetwork,
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -3033,6 +3034,23 @@ impl GetPaymentMethodType for GiftCardData {
|
||||
pub enum GiftCardData {
|
||||
Givex(GiftCardDetails),
|
||||
PaySafeCard {},
|
||||
BhnCardNetwork(BHNGiftCardDetails),
|
||||
}
|
||||
#[derive(serde::Deserialize, serde::Serialize, Debug, Clone, ToSchema, Eq, PartialEq)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub struct BHNGiftCardDetails {
|
||||
/// The gift card or account number
|
||||
#[schema(value_type = String)]
|
||||
pub account_number: Secret<String>,
|
||||
/// The security PIN for gift cards requiring it
|
||||
#[schema(value_type = String)]
|
||||
pub pin: Option<Secret<String>>,
|
||||
/// The CVV2 code for Open Loop/VPLN products
|
||||
#[schema(value_type = String)]
|
||||
pub cvv2: Option<Secret<String>>,
|
||||
/// The expiration date in MMYYYY format for Open Loop/VPLN products
|
||||
#[schema(value_type = String)]
|
||||
pub expiration_date: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(serde::Deserialize, serde::Serialize, Debug, Clone, ToSchema, Eq, PartialEq)]
|
||||
|
||||
@ -200,6 +200,7 @@ pub struct LocalBankTransferAdditionalData {
|
||||
pub enum GiftCardAdditionalData {
|
||||
Givex(Box<GivexGiftCardAdditionalData>),
|
||||
PaySafeCard {},
|
||||
BhnCardNetwork {},
|
||||
}
|
||||
|
||||
#[derive(Eq, PartialEq, Clone, Debug, serde::Deserialize, serde::Serialize, ToSchema)]
|
||||
|
||||
Reference in New Issue
Block a user