Skip to content

Commit

Permalink
Merge branch 'main' of github.com:juspay/hyperswitch into env_split
Browse files Browse the repository at this point in the history
* 'main' of github.com:juspay/hyperswitch:
  fix(connector): [Stripe] Deserialization Error while parsing Dispute Webhook Body (#3256)
  refactor(euclid_wasm): Update wasm config (#3222)
  fix(analytics): added response to the connector outgoing event (#3129)
  fix(analytics): fixed response code to 501 (#3119)
  fix(connector): [NMI] Populating `ErrorResponse` with required fields and Mapping `connector_response_reference_id` (#3214)
  feat(merchant_account): Add list multiple merchants in `MerchantAccountInterface` (#3220)
  feat: include version number in response headers and on application startup (#3045)
  chore: address Rust 1.75 clippy lints (#3231)
  feat: add deep health check (#3210)
  feat(analytics): adding outgoing webhooks kafka event (#3140)
  refactor: address panics due to indexing and slicing (#3233)
  fix(users): Fix wrong redirection url in magic link (#3217)
  fix(user): add integration_completed enum in metadata type (#3245)
  chore(version): v1.106.1
  fix(connector): [iatapay] change refund amount (#3244)
  chore(version): v1.106.0
  test(postman): update postman collection files
  fix(core): fix recurring mandates flow for cyber source (#3224)
  chore: fix channel handling for consumer workflow loop (#3223)
  • Loading branch information
pixincreate committed Jan 8, 2024
2 parents c793d81 + 01b4ac3 commit f65767f
Show file tree
Hide file tree
Showing 117 changed files with 7,639 additions and 1,759 deletions.
11 changes: 6 additions & 5 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@ rustflags = [
"-Funsafe_code",
"-Wclippy::as_conversions",
"-Wclippy::expect_used",
"-Wclippy::index_refutable_slice",
"-Wclippy::indexing_slicing",
"-Wclippy::match_on_vec_items",
"-Wclippy::missing_panics_doc",
"-Wclippy::panic_in_result_fn",
"-Wclippy::out_of_bounds_indexing",
"-Wclippy::panic",
"-Wclippy::panic_in_result_fn",
"-Wclippy::panicking_unwrap",
"-Wclippy::todo",
"-Wclippy::unimplemented",
Expand All @@ -23,10 +27,7 @@ rustflags = [


[build]
rustdocflags = [
"--cfg",
"uuid_unstable"
]
rustdocflags = ["--cfg", "uuid_unstable"]

[alias]
gen-pg = "generate --path ../../../../connector-template -n"
43 changes: 43 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,49 @@ All notable changes to HyperSwitch will be documented here.

- - -

## 1.106.1 (2024-01-05)

### Bug Fixes

- **connector:** [iatapay] change refund amount ([#3244](https://github.com/juspay/hyperswitch/pull/3244)) ([`e79604b`](https://github.com/juspay/hyperswitch/commit/e79604bd4681a69802f3c3169dd94424e3688e42))

**Full Changelog:** [`v1.106.0...v1.106.1`](https://github.com/juspay/hyperswitch/compare/v1.106.0...v1.106.1)

- - -


## 1.106.0 (2024-01-04)

### Features

- **connector:**
- [BOA] Populate merchant_defined_information with metadata ([#3208](https://github.com/juspay/hyperswitch/pull/3208)) ([`18eca7e`](https://github.com/juspay/hyperswitch/commit/18eca7e9fbe6cdc101bd135c4618882b7a5455bf))
- [CYBERSOURCE] Refactor cybersource ([#3215](https://github.com/juspay/hyperswitch/pull/3215)) ([`e06ba14`](https://github.com/juspay/hyperswitch/commit/e06ba148b666772fe79d7050d0c505dd2f04f87c))
- **customers:** Add JWT Authentication for `/customers` APIs ([#3179](https://github.com/juspay/hyperswitch/pull/3179)) ([`aefe618`](https://github.com/juspay/hyperswitch/commit/aefe6184ec3e3156877c72988ca0f92454a47e7d))

### Bug Fixes

- **connector:** [Volt] Error handling for auth response ([#3187](https://github.com/juspay/hyperswitch/pull/3187)) ([`a51c54d`](https://github.com/juspay/hyperswitch/commit/a51c54d39d3687c6a06176895435ac66fa194d7b))
- **core:** Fix recurring mandates flow for cyber source ([#3224](https://github.com/juspay/hyperswitch/pull/3224)) ([`6a1743e`](https://github.com/juspay/hyperswitch/commit/6a1743ebe993d5abb53f2ce1b8b383aa4a9553fb))
- **middleware:** Add support for logging request-id sent in request ([#3225](https://github.com/juspay/hyperswitch/pull/3225)) ([`0f72b55`](https://github.com/juspay/hyperswitch/commit/0f72b5527aab221b8e69e737e5d19abdd0696150))

### Refactors

- **connector:** [NMI] Include mandatory fields for card 3DS ([#3203](https://github.com/juspay/hyperswitch/pull/3203)) ([`a46b8a7`](https://github.com/juspay/hyperswitch/commit/a46b8a7b05367fbbdbf4fca89d8a6b29110a4e1c))

### Testing

- **postman:** Update postman collection files ([`0248d35`](https://github.com/juspay/hyperswitch/commit/0248d35dd49d2dc7e5e4da6b60a3ee3577c8eac9))

### Miscellaneous Tasks

- Fix channel handling for consumer workflow loop ([#3223](https://github.com/juspay/hyperswitch/pull/3223)) ([`51e1fac`](https://github.com/juspay/hyperswitch/commit/51e1fac556fdd8775e0bbc858b0b3cc50a7e88ec))

**Full Changelog:** [`v1.105.0...v1.106.0`](https://github.com/juspay/hyperswitch/compare/v1.105.0...v1.106.0)

- - -


## 1.105.0 (2023-12-23)

### Features
Expand Down
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 7 additions & 6 deletions config/config.example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -514,9 +514,10 @@ enabled = true # Switch to enable or disable PayPal onboarding
source = "logs" # The event sink to push events supports kafka or logs (stdout)

[events.kafka]
brokers = [] # Kafka broker urls for bootstrapping the client
intent_analytics_topic = "topic" # Kafka topic to be used for PaymentIntent events
attempt_analytics_topic = "topic" # Kafka topic to be used for PaymentAttempt events
refund_analytics_topic = "topic" # Kafka topic to be used for Refund events
api_logs_topic = "topic" # Kafka topic to be used for incoming api events
connector_logs_topic = "topic" # Kafka topic to be used for connector api events
brokers = [] # Kafka broker urls for bootstrapping the client
intent_analytics_topic = "topic" # Kafka topic to be used for PaymentIntent events
attempt_analytics_topic = "topic" # Kafka topic to be used for PaymentAttempt events
refund_analytics_topic = "topic" # Kafka topic to be used for Refund events
api_logs_topic = "topic" # Kafka topic to be used for incoming api events
connector_logs_topic = "topic" # Kafka topic to be used for connector api events
outgoing_webhook_logs_topic = "topic" # Kafka topic to be used for outgoing webhook events
5 changes: 3 additions & 2 deletions config/development.toml
Original file line number Diff line number Diff line change
Expand Up @@ -468,8 +468,8 @@ connectors_with_webhook_source_verification_call = "paypal"

[mandates.supported_payment_methods]
pay_later.klarna = { connector_list = "adyen" }
wallet.google_pay = { connector_list = "stripe,adyen" }
wallet.apple_pay = { connector_list = "stripe,adyen" }
wallet.google_pay = { connector_list = "stripe,adyen,cybersource" }
wallet.apple_pay = { connector_list = "stripe,adyen,cybersource,noon" }
wallet.paypal = { connector_list = "adyen" }
card.credit = { connector_list = "stripe,adyen,authorizedotnet,cybersource,globalpay,worldpay,multisafepay,nmi,nexinets,noon" }
card.debit = { connector_list = "stripe,adyen,authorizedotnet,cybersource,globalpay,worldpay,multisafepay,nmi,nexinets,noon" }
Expand Down Expand Up @@ -519,6 +519,7 @@ attempt_analytics_topic = "hyperswitch-payment-attempt-events"
refund_analytics_topic = "hyperswitch-refund-events"
api_logs_topic = "hyperswitch-api-log-events"
connector_logs_topic = "hyperswitch-connector-api-events"
outgoing_webhook_logs_topic = "hyperswitch-outgoing-webhook-events"

[analytics]
source = "sqlx"
Expand Down
1 change: 1 addition & 0 deletions config/docker_compose.toml
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,7 @@ attempt_analytics_topic = "hyperswitch-payment-attempt-events"
refund_analytics_topic = "hyperswitch-refund-events"
api_logs_topic = "hyperswitch-api-log-events"
connector_logs_topic = "hyperswitch-connector-api-events"
outgoing_webhook_logs_topic = "hyperswitch-outgoing-webhook-events"

[analytics]
source = "sqlx"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CREATE TABLE api_events_v2_queue (
CREATE TABLE api_events_queue (
`merchant_id` String,
`payment_id` Nullable(String),
`refund_id` Nullable(String),
Expand All @@ -14,12 +14,15 @@ CREATE TABLE api_events_v2_queue (
`api_auth_type` LowCardinality(String),
`request` String,
`response` Nullable(String),
`error` Nullable(String),
`authentication_data` Nullable(String),
`status_code` UInt32,
`created_at` DateTime CODEC(T64, LZ4),
`created_at_timestamp` DateTime64(3),
`latency` UInt128,
`user_agent` String,
`ip_addr` String,
`hs_latency` Nullable(UInt128),
`http_method` LowCardinality(String),
`url_path` String
) ENGINE = Kafka SETTINGS kafka_broker_list = 'kafka0:29092',
kafka_topic_list = 'hyperswitch-api-log-events',
Expand All @@ -28,7 +31,7 @@ kafka_format = 'JSONEachRow',
kafka_handle_error_mode = 'stream';


CREATE TABLE api_events_v2_dist (
CREATE TABLE api_events_dist (
`merchant_id` String,
`payment_id` Nullable(String),
`refund_id` Nullable(String),
Expand All @@ -44,13 +47,15 @@ CREATE TABLE api_events_v2_dist (
`api_auth_type` LowCardinality(String),
`request` String,
`response` Nullable(String),
`error` Nullable(String),
`authentication_data` Nullable(String),
`status_code` UInt32,
`created_at` DateTime CODEC(T64, LZ4),
`inserted_at` DateTime CODEC(T64, LZ4),
`created_at_timestamp` DateTime64(3),
`latency` UInt128,
`user_agent` String,
`ip_addr` String,
`hs_latency` Nullable(UInt128),
`http_method` LowCardinality(String),
`url_path` String,
INDEX flowIndex flow_type TYPE bloom_filter GRANULARITY 1,
INDEX apiIndex api_flow TYPE bloom_filter GRANULARITY 1,
Expand All @@ -62,7 +67,7 @@ ORDER BY
TTL created_at + toIntervalMonth(6)
;

CREATE MATERIALIZED VIEW api_events_v2_mv TO api_events_v2_dist (
CREATE MATERIALIZED VIEW api_events_mv TO api_events_dist (
`merchant_id` String,
`payment_id` Nullable(String),
`refund_id` Nullable(String),
Expand All @@ -78,13 +83,15 @@ CREATE MATERIALIZED VIEW api_events_v2_mv TO api_events_v2_dist (
`api_auth_type` LowCardinality(String),
`request` String,
`response` Nullable(String),
`error` Nullable(String),
`authentication_data` Nullable(String),
`status_code` UInt32,
`created_at` DateTime CODEC(T64, LZ4),
`inserted_at` DateTime CODEC(T64, LZ4),
`created_at_timestamp` DateTime64(3),
`latency` UInt128,
`user_agent` String,
`ip_addr` String,
`hs_latency` Nullable(UInt128),
`http_method` LowCardinality(String),
`url_path` String
) AS
SELECT
Expand All @@ -103,16 +110,19 @@ SELECT
api_auth_type,
request,
response,
error,
authentication_data,
status_code,
created_at,
created_at_timestamp,
now() as inserted_at,
latency,
user_agent,
ip_addr,
hs_latency,
http_method,
url_path
FROM
api_events_v2_queue
api_events_queue
where length(_error) = 0;


Expand All @@ -133,6 +143,6 @@ SELECT
_offset AS offset,
_raw_message AS raw,
_error AS error
FROM api_events_v2_queue
FROM api_events_queue
WHERE length(_error) > 0
;
97 changes: 97 additions & 0 deletions crates/analytics/docs/clickhouse/scripts/connector_events.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
CREATE TABLE connector_events_queue (
`merchant_id` String,
`payment_id` Nullable(String),
`connector_name` LowCardinality(String),
`request_id` String,
`flow` LowCardinality(String),
`request` String,
`response` Nullable(String),
`error` Nullable(String),
`status_code` UInt32,
`created_at` DateTime64(3),
`latency` UInt128,
`method` LowCardinality(String)
) ENGINE = Kafka SETTINGS kafka_broker_list = 'kafka0:29092',
kafka_topic_list = 'hyperswitch-connector-api-events',
kafka_group_name = 'hyper-c1',
kafka_format = 'JSONEachRow',
kafka_handle_error_mode = 'stream';


CREATE TABLE connector_events_dist (
`merchant_id` String,
`payment_id` Nullable(String),
`connector_name` LowCardinality(String),
`request_id` String,
`flow` LowCardinality(String),
`request` String,
`response` Nullable(String),
`error` Nullable(String),
`status_code` UInt32,
`created_at` DateTime64(3),
`inserted_at` DateTime64(3),
`latency` UInt128,
`method` LowCardinality(String),
INDEX flowIndex flowTYPE bloom_filter GRANULARITY 1,
INDEX connectorIndex connector_name TYPE bloom_filter GRANULARITY 1,
INDEX statusIndex status_code TYPE bloom_filter GRANULARITY 1
) ENGINE = MergeTree
PARTITION BY toStartOfDay(created_at)
ORDER BY
(created_at, merchant_id, flow_type, status_code, api_flow)
TTL created_at + toIntervalMonth(6)
;

CREATE MATERIALIZED VIEW connector_events_mv TO connector_events_dist (
`merchant_id` String,
`payment_id` Nullable(String),
`connector_name` LowCardinality(String),
`request_id` String,
`flow` LowCardinality(String),
`request` String,
`response` Nullable(String),
`error` Nullable(String),
`status_code` UInt32,
`created_at` DateTime64(3),
`latency` UInt128,
`method` LowCardinality(String)
) AS
SELECT
merchant_id,
payment_id,
connector_name,
request_id,
flow,
request,
response,
error,
status_code,
created_at,
now() as inserted_at,
latency,
method,
FROM
connector_events_queue
where length(_error) = 0;


CREATE MATERIALIZED VIEW connector_events_parse_errors
(
`topic` String,
`partition` Int64,
`offset` Int64,
`raw` String,
`error` String
)
ENGINE = MergeTree
ORDER BY (topic, partition, offset)
SETTINGS index_granularity = 8192 AS
SELECT
_topic AS topic,
_partition AS partition,
_offset AS offset,
_raw_message AS raw,
_error AS error
FROM connector_events_queue
WHERE length(_error) > 0
;
Loading

0 comments on commit f65767f

Please sign in to comment.