mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-02 12:06:56 +08:00
fix: fix some fields not being updated during payments create, update and confirm (#1451)
Co-authored-by: Narayan Bhat <narayan.bhat@juspay.in>
This commit is contained in:
@ -113,6 +113,8 @@ pub enum PaymentAttemptUpdate {
|
||||
payment_method_type: Option<storage_enums::PaymentMethodType>,
|
||||
payment_experience: Option<storage_enums::PaymentExperience>,
|
||||
business_sub_label: Option<String>,
|
||||
amount_to_capture: Option<i64>,
|
||||
capture_method: Option<storage_enums::CaptureMethod>,
|
||||
},
|
||||
UpdateTrackers {
|
||||
payment_token: Option<String>,
|
||||
@ -189,6 +191,7 @@ pub struct PaymentAttemptUpdateInternal {
|
||||
currency: Option<storage_enums::Currency>,
|
||||
status: Option<storage_enums::AttemptStatus>,
|
||||
connector_transaction_id: Option<String>,
|
||||
amount_to_capture: Option<i64>,
|
||||
connector: Option<String>,
|
||||
authentication_type: Option<storage_enums::AuthenticationType>,
|
||||
payment_method: Option<storage_enums::PaymentMethod>,
|
||||
@ -208,6 +211,7 @@ pub struct PaymentAttemptUpdateInternal {
|
||||
straight_through_algorithm: Option<serde_json::Value>,
|
||||
preprocessing_step_id: Option<String>,
|
||||
error_reason: Option<Option<String>>,
|
||||
capture_method: Option<storage_enums::CaptureMethod>,
|
||||
}
|
||||
|
||||
impl PaymentAttemptUpdate {
|
||||
@ -254,6 +258,8 @@ impl From<PaymentAttemptUpdate> for PaymentAttemptUpdateInternal {
|
||||
payment_method_type,
|
||||
payment_experience,
|
||||
business_sub_label,
|
||||
amount_to_capture,
|
||||
capture_method,
|
||||
} => Self {
|
||||
amount: Some(amount),
|
||||
currency: Some(currency),
|
||||
@ -267,6 +273,8 @@ impl From<PaymentAttemptUpdate> for PaymentAttemptUpdateInternal {
|
||||
payment_method_type,
|
||||
payment_experience,
|
||||
business_sub_label,
|
||||
amount_to_capture,
|
||||
capture_method,
|
||||
..Default::default()
|
||||
},
|
||||
PaymentAttemptUpdate::AuthenticationTypeUpdate {
|
||||
|
||||
@ -122,6 +122,9 @@ pub enum PaymentIntentUpdate {
|
||||
return_url: Option<String>,
|
||||
business_country: Option<storage_enums::CountryAlpha2>,
|
||||
business_label: Option<String>,
|
||||
description: Option<String>,
|
||||
statement_descriptor_name: Option<String>,
|
||||
statement_descriptor_suffix: Option<String>,
|
||||
order_details: Option<Vec<pii::SecretSerdeValue>>,
|
||||
metadata: Option<pii::SecretSerdeValue>,
|
||||
udf: Option<pii::SecretSerdeValue>,
|
||||
@ -155,6 +158,9 @@ pub struct PaymentIntentUpdateInternal {
|
||||
pub active_attempt_id: Option<String>,
|
||||
pub business_country: Option<storage_enums::CountryAlpha2>,
|
||||
pub business_label: Option<String>,
|
||||
pub description: Option<String>,
|
||||
pub statement_descriptor_name: Option<String>,
|
||||
pub statement_descriptor_suffix: Option<String>,
|
||||
#[diesel(deserialize_as = super::OptionalDieselArray<pii::SecretSerdeValue>)]
|
||||
pub order_details: Option<Vec<pii::SecretSerdeValue>>,
|
||||
pub udf: Option<pii::SecretSerdeValue>,
|
||||
@ -205,6 +211,9 @@ impl From<PaymentIntentUpdate> for PaymentIntentUpdateInternal {
|
||||
return_url,
|
||||
business_country,
|
||||
business_label,
|
||||
description,
|
||||
statement_descriptor_name,
|
||||
statement_descriptor_suffix,
|
||||
order_details,
|
||||
metadata,
|
||||
udf,
|
||||
@ -221,6 +230,9 @@ impl From<PaymentIntentUpdate> for PaymentIntentUpdateInternal {
|
||||
return_url,
|
||||
business_country,
|
||||
business_label,
|
||||
description,
|
||||
statement_descriptor_name,
|
||||
statement_descriptor_suffix,
|
||||
order_details,
|
||||
metadata,
|
||||
udf,
|
||||
|
||||
Reference in New Issue
Block a user