mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 00:49:42 +08:00
feat(router): add confirm flag in kafka payment intent events (#8432)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
62ec934cf8
commit
bc767b9131
@ -52,6 +52,25 @@ pub struct KeyManagerState {
|
||||
pub infra_values: Option<serde_json::Value>,
|
||||
}
|
||||
|
||||
impl KeyManagerState {
|
||||
pub fn add_confirm_value_in_infra_values(
|
||||
&self,
|
||||
is_confirm_operation: bool,
|
||||
) -> Option<serde_json::Value> {
|
||||
self.infra_values.clone().map(|mut infra_values| {
|
||||
if is_confirm_operation {
|
||||
infra_values.as_object_mut().map(|obj| {
|
||||
obj.insert(
|
||||
"is_confirm_operation".to_string(),
|
||||
serde_json::Value::Bool(true),
|
||||
)
|
||||
});
|
||||
}
|
||||
infra_values
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
pub trait GetKeymanagerTenant {
|
||||
fn get_tenant_id(&self, state: &KeyManagerState) -> id_type::TenantId;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user