mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-12-09 07:17:29 +08:00
refactor: Add a GAT Data to Operation trait (#5825)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@@ -55,7 +55,7 @@ use crate::{
|
||||
core::{
|
||||
authentication::types::ExternalThreeDSConnectorMetadata,
|
||||
errors::{self, CustomResult, RouterResult, StorageErrorExt},
|
||||
webhooks as webhooks_core,
|
||||
payments as payments_core, webhooks as webhooks_core,
|
||||
},
|
||||
logger,
|
||||
routes::{metrics, SessionState},
|
||||
@@ -1085,11 +1085,11 @@ pub fn check_if_pull_mechanism_for_external_3ds_enabled_from_connector_metadata(
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub async fn trigger_payments_webhook<F, Op>(
|
||||
pub async fn trigger_payments_webhook<F, Op, D>(
|
||||
merchant_account: domain::MerchantAccount,
|
||||
business_profile: domain::BusinessProfile,
|
||||
key_store: &domain::MerchantKeyStore,
|
||||
payment_data: crate::core::payments::PaymentData<F>,
|
||||
payment_data: D,
|
||||
customer: Option<domain::Customer>,
|
||||
state: &SessionState,
|
||||
operation: Op,
|
||||
@@ -1097,12 +1097,12 @@ pub async fn trigger_payments_webhook<F, Op>(
|
||||
where
|
||||
F: Send + Clone + Sync,
|
||||
Op: Debug,
|
||||
D: payments_core::OperationSessionGetters<F>,
|
||||
{
|
||||
let status = payment_data.payment_intent.status;
|
||||
let payment_id = payment_data.payment_intent.payment_id.clone();
|
||||
let status = payment_data.get_payment_intent().status;
|
||||
let payment_id = payment_data.get_payment_intent().payment_id.clone();
|
||||
let captures = payment_data
|
||||
.multiple_capture_data
|
||||
.clone()
|
||||
.get_multiple_capture_data()
|
||||
.map(|multiple_capture_data| {
|
||||
multiple_capture_data
|
||||
.get_all_captures()
|
||||
|
||||
Reference in New Issue
Block a user