mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-27 19:46:48 +08:00
feat(core): Add support to update card exp in update payment methods api (#9688)
This commit is contained in:
@ -294,6 +294,7 @@ pub struct PaymentMethodRecordUpdateResponse {
|
||||
pub status: common_enums::PaymentMethodStatus,
|
||||
pub network_transaction_id: Option<String>,
|
||||
pub connector_mandate_details: Option<pii::SecretSerdeValue>,
|
||||
pub updated_payment_method_data: Option<bool>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Default, Clone, serde::Serialize, serde::Deserialize)]
|
||||
@ -2689,7 +2690,9 @@ pub struct UpdatePaymentMethodRecord {
|
||||
pub network_transaction_id: Option<String>,
|
||||
pub line_number: Option<i64>,
|
||||
pub payment_instrument_id: Option<masking::Secret<String>>,
|
||||
pub merchant_connector_id: Option<id_type::MerchantConnectorAccountId>,
|
||||
pub merchant_connector_ids: Option<String>,
|
||||
pub card_expiry_month: Option<masking::Secret<String>>,
|
||||
pub card_expiry_year: Option<masking::Secret<String>>,
|
||||
}
|
||||
|
||||
#[derive(Debug, serde::Serialize)]
|
||||
@ -2701,6 +2704,7 @@ pub struct PaymentMethodUpdateResponse {
|
||||
pub update_status: UpdateStatus,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub update_error: Option<String>,
|
||||
pub updated_payment_method_data: Option<bool>,
|
||||
pub line_number: Option<i64>,
|
||||
}
|
||||
|
||||
@ -2841,6 +2845,7 @@ impl From<PaymentMethodUpdateResponseType> for PaymentMethodUpdateResponse {
|
||||
status: Some(res.status),
|
||||
network_transaction_id: res.network_transaction_id,
|
||||
connector_mandate_details: res.connector_mandate_details,
|
||||
updated_payment_method_data: res.updated_payment_method_data,
|
||||
update_status: UpdateStatus::Success,
|
||||
update_error: None,
|
||||
line_number: record.line_number,
|
||||
@ -2850,6 +2855,7 @@ impl From<PaymentMethodUpdateResponseType> for PaymentMethodUpdateResponse {
|
||||
status: record.status,
|
||||
network_transaction_id: record.network_transaction_id,
|
||||
connector_mandate_details: None,
|
||||
updated_payment_method_data: None,
|
||||
update_status: UpdateStatus::Failed,
|
||||
update_error: Some(e),
|
||||
line_number: record.line_number,
|
||||
|
||||
Reference in New Issue
Block a user