mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 17:19:15 +08:00
feat(events): add profile_id in payment_intents events and clickhouse (#5573)
This commit is contained in:
@ -19,6 +19,7 @@ CREATE TABLE payment_intents_queue
|
|||||||
`business_country` LowCardinality(String),
|
`business_country` LowCardinality(String),
|
||||||
`business_label` String,
|
`business_label` String,
|
||||||
`attempt_count` UInt8,
|
`attempt_count` UInt8,
|
||||||
|
`profile_id` Nullable(String),
|
||||||
`modified_at` DateTime CODEC(T64, LZ4),
|
`modified_at` DateTime CODEC(T64, LZ4),
|
||||||
`created_at` DateTime CODEC(T64, LZ4),
|
`created_at` DateTime CODEC(T64, LZ4),
|
||||||
`last_synced` Nullable(DateTime) CODEC(T64, LZ4),
|
`last_synced` Nullable(DateTime) CODEC(T64, LZ4),
|
||||||
@ -50,6 +51,7 @@ CREATE TABLE payment_intents
|
|||||||
`business_country` LowCardinality(String),
|
`business_country` LowCardinality(String),
|
||||||
`business_label` String,
|
`business_label` String,
|
||||||
`attempt_count` UInt8,
|
`attempt_count` UInt8,
|
||||||
|
`profile_id` Nullable(String),
|
||||||
`modified_at` DateTime DEFAULT now() CODEC(T64, LZ4),
|
`modified_at` DateTime DEFAULT now() CODEC(T64, LZ4),
|
||||||
`created_at` DateTime DEFAULT now() CODEC(T64, LZ4),
|
`created_at` DateTime DEFAULT now() CODEC(T64, LZ4),
|
||||||
`last_synced` Nullable(DateTime) CODEC(T64, LZ4),
|
`last_synced` Nullable(DateTime) CODEC(T64, LZ4),
|
||||||
@ -86,6 +88,7 @@ CREATE MATERIALIZED VIEW payment_intents_mv TO payment_intents
|
|||||||
`business_country` LowCardinality(String),
|
`business_country` LowCardinality(String),
|
||||||
`business_label` String,
|
`business_label` String,
|
||||||
`attempt_count` UInt8,
|
`attempt_count` UInt8,
|
||||||
|
`profile_id` Nullable(String),
|
||||||
`modified_at` DateTime64(3),
|
`modified_at` DateTime64(3),
|
||||||
`created_at` DateTime64(3),
|
`created_at` DateTime64(3),
|
||||||
`last_synced` Nullable(DateTime64(3)),
|
`last_synced` Nullable(DateTime64(3)),
|
||||||
@ -112,6 +115,7 @@ SELECT
|
|||||||
business_country,
|
business_country,
|
||||||
business_label,
|
business_label,
|
||||||
attempt_count,
|
attempt_count,
|
||||||
|
profile_id,
|
||||||
modified_at,
|
modified_at,
|
||||||
created_at,
|
created_at,
|
||||||
last_synced,
|
last_synced,
|
||||||
|
|||||||
@ -33,6 +33,7 @@ pub struct KafkaPaymentIntent<'a> {
|
|||||||
pub business_country: Option<storage_enums::CountryAlpha2>,
|
pub business_country: Option<storage_enums::CountryAlpha2>,
|
||||||
pub business_label: Option<&'a String>,
|
pub business_label: Option<&'a String>,
|
||||||
pub attempt_count: i16,
|
pub attempt_count: i16,
|
||||||
|
pub profile_id: Option<&'a String>,
|
||||||
pub payment_confirm_source: Option<storage_enums::PaymentSource>,
|
pub payment_confirm_source: Option<storage_enums::PaymentSource>,
|
||||||
pub billing_details: Option<Encryptable<Secret<Value>>>,
|
pub billing_details: Option<Encryptable<Secret<Value>>>,
|
||||||
pub shipping_details: Option<Encryptable<Secret<Value>>>,
|
pub shipping_details: Option<Encryptable<Secret<Value>>>,
|
||||||
@ -67,6 +68,7 @@ impl<'a> KafkaPaymentIntent<'a> {
|
|||||||
business_country: intent.business_country,
|
business_country: intent.business_country,
|
||||||
business_label: intent.business_label.as_ref(),
|
business_label: intent.business_label.as_ref(),
|
||||||
attempt_count: intent.attempt_count,
|
attempt_count: intent.attempt_count,
|
||||||
|
profile_id: intent.profile_id.as_ref(),
|
||||||
payment_confirm_source: intent.payment_confirm_source,
|
payment_confirm_source: intent.payment_confirm_source,
|
||||||
// TODO: use typed information here to avoid PII logging
|
// TODO: use typed information here to avoid PII logging
|
||||||
billing_details: None,
|
billing_details: None,
|
||||||
|
|||||||
@ -34,6 +34,7 @@ pub struct KafkaPaymentIntentEvent<'a> {
|
|||||||
pub business_country: Option<storage_enums::CountryAlpha2>,
|
pub business_country: Option<storage_enums::CountryAlpha2>,
|
||||||
pub business_label: Option<&'a String>,
|
pub business_label: Option<&'a String>,
|
||||||
pub attempt_count: i16,
|
pub attempt_count: i16,
|
||||||
|
pub profile_id: Option<&'a String>,
|
||||||
pub payment_confirm_source: Option<storage_enums::PaymentSource>,
|
pub payment_confirm_source: Option<storage_enums::PaymentSource>,
|
||||||
pub billing_details: Option<Encryptable<Secret<Value>>>,
|
pub billing_details: Option<Encryptable<Secret<Value>>>,
|
||||||
pub shipping_details: Option<Encryptable<Secret<Value>>>,
|
pub shipping_details: Option<Encryptable<Secret<Value>>>,
|
||||||
@ -68,6 +69,7 @@ impl<'a> KafkaPaymentIntentEvent<'a> {
|
|||||||
business_country: intent.business_country,
|
business_country: intent.business_country,
|
||||||
business_label: intent.business_label.as_ref(),
|
business_label: intent.business_label.as_ref(),
|
||||||
attempt_count: intent.attempt_count,
|
attempt_count: intent.attempt_count,
|
||||||
|
profile_id: intent.profile_id.as_ref(),
|
||||||
payment_confirm_source: intent.payment_confirm_source,
|
payment_confirm_source: intent.payment_confirm_source,
|
||||||
// TODO: use typed information here to avoid PII logging
|
// TODO: use typed information here to avoid PII logging
|
||||||
billing_details: None,
|
billing_details: None,
|
||||||
|
|||||||
Reference in New Issue
Block a user