feat(router): use payment confirm for confirmed payments in payments create and update (#165)

Co-authored-by: Arun Raj M <jarnura47@gmail.com>
This commit is contained in:
ItsMeShashank
2022-12-21 14:36:37 +05:30
committed by GitHub
parent 60d1ad52b1
commit 47741b47fa
5 changed files with 62 additions and 18 deletions

View File

@ -95,7 +95,10 @@ pub enum PaymentAttemptUpdate {
authentication_type: storage_enums::AuthenticationType,
},
ConfirmUpdate {
amount: i64,
currency: storage_enums::Currency,
status: storage_enums::AttemptStatus,
authentication_type: Option<storage_enums::AuthenticationType>,
payment_method: Option<storage_enums::PaymentMethodType>,
browser_info: Option<serde_json::Value>,
connector: Option<String>,
@ -199,12 +202,18 @@ impl From<PaymentAttemptUpdate> for PaymentAttemptUpdateInternal {
..Default::default()
},
PaymentAttemptUpdate::ConfirmUpdate {
amount,
currency,
authentication_type,
status,
payment_method,
browser_info,
connector,
payment_token,
} => Self {
amount: Some(amount),
currency: Some(currency),
authentication_type,
status: Some(status),
payment_method,
modified_at: Some(common_utils::date_time::now()),