mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-02 21:07:58 +08:00
feat(router): add card_info in payment_attempt table if not provided in request (#1538)
Co-authored-by: Sahkal Poddar <sahkal.poddar@juspay.in>
This commit is contained in:
@ -1,14 +1,14 @@
|
||||
use diesel::{Identifiable, Queryable};
|
||||
use time::PrimitiveDateTime;
|
||||
|
||||
use crate::schema::cards_info;
|
||||
use crate::{enums as storage_enums, schema::cards_info};
|
||||
|
||||
#[derive(Clone, Debug, Queryable, Identifiable, serde::Deserialize, serde::Serialize)]
|
||||
#[diesel(table_name = cards_info, primary_key(card_iin))]
|
||||
pub struct CardInfo {
|
||||
pub card_iin: String,
|
||||
pub card_issuer: Option<String>,
|
||||
pub card_network: Option<String>,
|
||||
pub card_network: Option<storage_enums::CardNetwork>,
|
||||
pub card_type: Option<String>,
|
||||
pub card_subtype: Option<String>,
|
||||
pub card_issuing_country: Option<String>,
|
||||
|
||||
@ -805,6 +805,33 @@ pub enum BankNames {
|
||||
Boz,
|
||||
}
|
||||
|
||||
#[derive(
|
||||
Clone,
|
||||
Debug,
|
||||
Eq,
|
||||
Hash,
|
||||
PartialEq,
|
||||
serde::Deserialize,
|
||||
serde::Serialize,
|
||||
strum::Display,
|
||||
strum::EnumString,
|
||||
frunk::LabelledGeneric,
|
||||
)]
|
||||
#[router_derive::diesel_enum(storage_type = "text")]
|
||||
pub enum CardNetwork {
|
||||
Visa,
|
||||
Mastercard,
|
||||
AmericanExpress,
|
||||
JCB,
|
||||
DinersClub,
|
||||
Discover,
|
||||
CartesBancaires,
|
||||
UnionPay,
|
||||
Interac,
|
||||
RuPay,
|
||||
Maestro,
|
||||
}
|
||||
|
||||
#[derive(
|
||||
Eq,
|
||||
PartialEq,
|
||||
|
||||
Reference in New Issue
Block a user