mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-28 04:04:55 +08:00
refactor(core): make attempt id as mandatory in router_data (#604)
This commit is contained in:
@ -22,7 +22,7 @@ fn construct_payment_router_data() -> types::PaymentsAuthorizeRouterData {
|
||||
merchant_id: String::from("aci"),
|
||||
connector: "aci".to_string(),
|
||||
payment_id: uuid::Uuid::new_v4().to_string(),
|
||||
attempt_id: None,
|
||||
attempt_id: uuid::Uuid::new_v4().to_string(),
|
||||
status: enums::AttemptStatus::default(),
|
||||
auth_type: enums::AuthenticationType::NoThreeDs,
|
||||
payment_method: enums::PaymentMethodType::Card,
|
||||
@ -72,7 +72,7 @@ fn construct_refund_router_data<F>() -> types::RefundsRouterData<F> {
|
||||
merchant_id: String::from("aci"),
|
||||
connector: "aci".to_string(),
|
||||
payment_id: uuid::Uuid::new_v4().to_string(),
|
||||
attempt_id: None,
|
||||
attempt_id: uuid::Uuid::new_v4().to_string(),
|
||||
status: enums::AttemptStatus::default(),
|
||||
router_return_url: None,
|
||||
payment_method: enums::PaymentMethodType::Card,
|
||||
|
||||
@ -22,7 +22,7 @@ fn construct_payment_router_data() -> types::PaymentsAuthorizeRouterData {
|
||||
merchant_id: String::from("authorizedotnet"),
|
||||
connector: "authorizedotnet".to_string(),
|
||||
payment_id: uuid::Uuid::new_v4().to_string(),
|
||||
attempt_id: None,
|
||||
attempt_id: uuid::Uuid::new_v4().to_string(),
|
||||
status: enums::AttemptStatus::default(),
|
||||
router_return_url: None,
|
||||
payment_method: enums::PaymentMethodType::Card,
|
||||
@ -73,7 +73,7 @@ fn construct_refund_router_data<F>() -> types::RefundsRouterData<F> {
|
||||
merchant_id: String::from("authorizedotnet"),
|
||||
connector: "authorizedotnet".to_string(),
|
||||
payment_id: uuid::Uuid::new_v4().to_string(),
|
||||
attempt_id: None,
|
||||
attempt_id: uuid::Uuid::new_v4().to_string(),
|
||||
status: enums::AttemptStatus::default(),
|
||||
router_return_url: None,
|
||||
auth_type: enums::AuthenticationType::NoThreeDs,
|
||||
|
||||
@ -19,7 +19,7 @@ fn construct_payment_router_data() -> types::PaymentsAuthorizeRouterData {
|
||||
merchant_id: "checkout".to_string(),
|
||||
connector: "checkout".to_string(),
|
||||
payment_id: uuid::Uuid::new_v4().to_string(),
|
||||
attempt_id: None,
|
||||
attempt_id: uuid::Uuid::new_v4().to_string(),
|
||||
status: enums::AttemptStatus::default(),
|
||||
router_return_url: None,
|
||||
auth_type: enums::AuthenticationType::NoThreeDs,
|
||||
@ -70,7 +70,7 @@ fn construct_refund_router_data<F>() -> types::RefundsRouterData<F> {
|
||||
merchant_id: "checkout".to_string(),
|
||||
connector: "checkout".to_string(),
|
||||
payment_id: uuid::Uuid::new_v4().to_string(),
|
||||
attempt_id: None,
|
||||
attempt_id: uuid::Uuid::new_v4().to_string(),
|
||||
status: enums::AttemptStatus::default(),
|
||||
router_return_url: None,
|
||||
payment_method: enums::PaymentMethodType::Card,
|
||||
|
||||
@ -348,7 +348,7 @@ pub trait ConnectorActions: Connector {
|
||||
merchant_id: self.get_name(),
|
||||
connector: self.get_name(),
|
||||
payment_id: uuid::Uuid::new_v4().to_string(),
|
||||
attempt_id: Some(uuid::Uuid::new_v4().to_string()),
|
||||
attempt_id: uuid::Uuid::new_v4().to_string(),
|
||||
status: enums::AttemptStatus::default(),
|
||||
router_return_url: info.clone().and_then(|a| a.router_return_url),
|
||||
auth_type: info
|
||||
|
||||
Reference in New Issue
Block a user