Skip to content

Commit

Permalink
Merge branch 'main' of github.com:juspay/hyperswitch into multiple-cr…
Browse files Browse the repository at this point in the history
…ed-cypress

* 'main' of github.com:juspay/hyperswitch:
  fix(connector): [Cybersource] change commerce indicator for applepay (#6634)
  ci(cypress): Add Noon Connector (#6603)
  fix(analytics): remove first_attempt group by in Payment Intent old metrics (#6627)
  chore(version): 2024.11.22.0
  refactor: update API response for JSON deserialization errors (#6610)
  fix(connector): [Novalnet]  Get email from customer email if billing.email is not present  (#6619)
  feat(connector): [AIRWALLEX] Update production endpoint (#6632)
  feat(themes): Add `theme_name` and `entity_type` in themes table (#6621)
  feat(connector): [Xendit] Template PR (#6593)
  • Loading branch information
pixincreate committed Nov 22, 2024
2 parents b611a1e + 8d0639e commit c4d8809
Show file tree
Hide file tree
Showing 49 changed files with 2,132 additions and 103 deletions.
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,27 @@ All notable changes to HyperSwitch will be documented here.

- - -

## 2024.11.22.0

### Features

- **connector:**
- [Xendit] Template PR ([#6593](https://github.com/juspay/hyperswitch/pull/6593)) ([`9bc363f`](https://github.com/juspay/hyperswitch/commit/9bc363f140afcdc3d4dc624d6410a42c33afaeed))
- [AIRWALLEX] Update production endpoint ([#6632](https://github.com/juspay/hyperswitch/pull/6632)) ([`bc65a84`](https://github.com/juspay/hyperswitch/commit/bc65a848a14c1e5c8a50cf4bf5764a7af2918ac9))
- **themes:** Add `theme_name` and `entity_type` in themes table ([#6621](https://github.com/juspay/hyperswitch/pull/6621)) ([`bf13c16`](https://github.com/juspay/hyperswitch/commit/bf13c16109d0113f900c806b0722895a36ec2d5a))

### Bug Fixes

- **connector:** [Novalnet] Get email from customer email if billing.email is not present ([#6619](https://github.com/juspay/hyperswitch/pull/6619)) ([`9010214`](https://github.com/juspay/hyperswitch/commit/9010214c6e62a65f91e0eeca6d5f21468e5c63aa))

### Refactors

- Update API response for JSON deserialization errors ([#6610](https://github.com/juspay/hyperswitch/pull/6610)) ([`40d3c38`](https://github.com/juspay/hyperswitch/commit/40d3c38b830a7163331778064d0e1917d30fc17e))

**Full Changelog:** [`2024.11.21.0...2024.11.22.0`](https://github.com/juspay/hyperswitch/compare/2024.11.21.0...2024.11.22.0)

- - -

## 2024.11.21.0

### Features
Expand Down
1 change: 1 addition & 0 deletions api-reference-v2/openapi_spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -18167,6 +18167,7 @@
"wise",
"worldline",
"worldpay",
"xendit",
"zen",
"plaid",
"zsl"
Expand Down
1 change: 1 addition & 0 deletions api-reference/openapi_spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -22815,6 +22815,7 @@
"wise",
"worldline",
"worldpay",
"xendit",
"zen",
"plaid",
"zsl"
Expand Down
2 changes: 2 additions & 0 deletions config/config.example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ wellsfargopayout.base_url = "https://api-sandbox.wellsfargo.com/"
wise.base_url = "https://api.sandbox.transferwise.tech/"
worldline.base_url = "https://eu.sandbox.api-ingenico.com/"
worldpay.base_url = "https://try.access.worldpay.com/"
xendit.base_url = "https://api.xendit.co"
zsl.base_url = "https://api.sitoffalb.net/"
zen.base_url = "https://api.zen-test.com/"
zen.secondary_base_url = "https://secure.zen-test.com/"
Expand Down Expand Up @@ -329,6 +330,7 @@ cards = [
"threedsecureio",
"thunes",
"worldpay",
"xendit",
"zen",
"zsl",
]
Expand Down
1 change: 1 addition & 0 deletions config/deployments/integration_test.toml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ wellsfargopayout.base_url = "https://api-sandbox.wellsfargo.com/"
wise.base_url = "https://api.sandbox.transferwise.tech/"
worldline.base_url = "https://eu.sandbox.api-ingenico.com/"
worldpay.base_url = "https://try.access.worldpay.com/"
xendit.base_url = "https://api.xendit.co"
zen.base_url = "https://api.zen-test.com/"
zen.secondary_base_url = "https://secure.zen-test.com/"
zsl.base_url = "https://api.sitoffalb.net/"
Expand Down
3 changes: 2 additions & 1 deletion config/deployments/production.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ adyen.base_url = "https://{{merchant_endpoint_prefix}}-checkout-live.adyenpaymen
adyen.payout_base_url = "https://{{merchant_endpoint_prefix}}-pal-live.adyenpayments.com/"
adyen.dispute_base_url = "https://{{merchant_endpoint_prefix}}-ca-live.adyen.com/"
adyenplatform.base_url = "https://balanceplatform-api-live.adyen.com/"
airwallex.base_url = "https://api-demo.airwallex.com/"
airwallex.base_url = "https://api.airwallex.com/"
amazonpay.base_url = "https://pay-api.amazon.com/v2"
applepay.base_url = "https://apple-pay-gateway.apple.com/"
authorizedotnet.base_url = "https://api.authorize.net/xml/v1/request.api"
Expand Down Expand Up @@ -115,6 +115,7 @@ wellsfargopayout.base_url = "https://api.wellsfargo.com/"
wise.base_url = "https://api.sandbox.transferwise.tech/"
worldline.base_url = "https://eu.sandbox.api-ingenico.com/"
worldpay.base_url = "https://try.access.worldpay.com/"
xendit.base_url = "https://api.xendit.co"
zen.base_url = "https://api.zen.com/"
zen.secondary_base_url = "https://secure.zen.com/"
zsl.base_url = "https://apirh.prodoffalb.net/"
Expand Down
1 change: 1 addition & 0 deletions config/deployments/sandbox.toml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ wellsfargopayout.base_url = "https://api-sandbox.wellsfargo.com/"
wise.base_url = "https://api.sandbox.transferwise.tech/"
worldline.base_url = "https://eu.sandbox.api-ingenico.com/"
worldpay.base_url = "https://try.access.worldpay.com/"
xendit.base_url = "https://api.xendit.co"
zen.base_url = "https://api.zen-test.com/"
zen.secondary_base_url = "https://secure.zen-test.com/"
zsl.base_url = "https://api.sitoffalb.net/"
Expand Down
2 changes: 2 additions & 0 deletions config/development.toml
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ cards = [
"wise",
"worldline",
"worldpay",
"xendit",
"zen",
"zsl",
]
Expand Down Expand Up @@ -279,6 +280,7 @@ stripe.base_url_file_upload = "https://files.stripe.com/"
wise.base_url = "https://api.sandbox.transferwise.tech/"
worldline.base_url = "https://eu.sandbox.api-ingenico.com/"
worldpay.base_url = "https://try.access.worldpay.com/"
xendit.base_url = "https://api.xendit.co"
trustpay.base_url = "https://test-tpgw.trustpay.eu/"
tsys.base_url = "https://stagegw.transnox.com/"
volt.base_url = "https://api.sandbox.volt.io/"
Expand Down
2 changes: 2 additions & 0 deletions config/docker_compose.toml
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ wellsfargopayout.base_url = "https://api-sandbox.wellsfargo.com/"
wise.base_url = "https://api.sandbox.transferwise.tech/"
worldline.base_url = "https://eu.sandbox.api-ingenico.com/"
worldpay.base_url = "https://try.access.worldpay.com/"
xendit.base_url = "https://api.xendit.co"
zen.base_url = "https://api.zen-test.com/"
zen.secondary_base_url = "https://secure.zen-test.com/"
zsl.base_url = "https://api.sitoffalb.net/"
Expand Down Expand Up @@ -287,6 +288,7 @@ cards = [
"wise",
"worldline",
"worldpay",
"xendit",
"zen",
"zsl",
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,6 @@ where
})
.switch()?;

query_builder
.add_select_column("attempt_count == 1 as first_attempt")
.switch()?;

query_builder.add_select_column("currency").switch()?;

query_builder
Expand Down Expand Up @@ -102,11 +98,6 @@ where
.switch()?;
}

query_builder
.add_group_by_clause("attempt_count")
.attach_printable("Error grouping by attempt_count")
.switch()?;

query_builder
.add_group_by_clause("currency")
.attach_printable("Error grouping by currency")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,6 @@ where
})
.switch()?;

query_builder
.add_select_column("(attempt_count == 1) as first_attempt".to_string())
.switch()?;

query_builder
.add_select_column(Aggregate::Min {
field: "created_at",
Expand Down Expand Up @@ -90,11 +86,6 @@ where
.switch()?;
}

query_builder
.add_group_by_clause("first_attempt")
.attach_printable("Error grouping by first_attempt")
.switch()?;

if let Some(granularity) = granularity.as_ref() {
granularity
.set_group_by_clause(&mut query_builder)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ where
.switch()?;

query_builder
.add_select_column("attempt_count == 1 as first_attempt")
.add_select_column("(attempt_count = 1) as first_attempt")
.switch()?;
query_builder.add_select_column("currency").switch()?;
query_builder
Expand Down Expand Up @@ -98,8 +98,8 @@ where
}

query_builder
.add_group_by_clause("attempt_count")
.attach_printable("Error grouping by attempt_count")
.add_group_by_clause("first_attempt")
.attach_printable("Error grouping by first_attempt")
.switch()?;
query_builder
.add_group_by_clause("currency")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ where
.switch()?;

query_builder
.add_select_column("attempt_count == 1 as first_attempt")
.add_select_column("(attempt_count = 1) as first_attempt")
.switch()?;

query_builder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ where
.switch()?;

query_builder
.add_select_column("(attempt_count == 1) as first_attempt".to_string())
.add_select_column("(attempt_count = 1) as first_attempt".to_string())
.switch()?;

query_builder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ where
.switch()?;

query_builder
.add_select_column("attempt_count == 1 as first_attempt")
.add_select_column("(attempt_count = 1) as first_attempt")
.switch()?;

query_builder.add_select_column("currency").switch()?;
Expand Down Expand Up @@ -105,7 +105,7 @@ where
.switch()?;
query_builder
.add_group_by_clause("currency")
.attach_printable("Error grouping by first_attempt")
.attach_printable("Error grouping by currency")
.switch()?;
if let Some(granularity) = granularity.as_ref() {
granularity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,6 @@ where
})
.switch()?;

query_builder
.add_select_column("attempt_count == 1 as first_attempt")
.switch()?;
query_builder.add_select_column("currency").switch()?;
query_builder
.add_select_column(Aggregate::Min {
Expand Down Expand Up @@ -98,10 +95,6 @@ where
.switch()?;
}

query_builder
.add_group_by_clause("first_attempt")
.attach_printable("Error grouping by first_attempt")
.switch()?;
query_builder
.add_group_by_clause("currency")
.attach_printable("Error grouping by currency")
Expand Down
2 changes: 2 additions & 0 deletions crates/api_models/src/connector_enums.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ pub enum Connector {
Signifyd,
Plaid,
Riskified,
// Xendit,
Zen,
Zsl,
}
Expand Down Expand Up @@ -259,6 +260,7 @@ impl Connector {
| Self::Wise
| Self::Worldline
| Self::Worldpay
// | Self::Xendit
| Self::Zen
| Self::Zsl
| Self::Signifyd
Expand Down
1 change: 1 addition & 0 deletions crates/common_enums/src/connector_enums.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ pub enum RoutableConnectors {
Wise,
Worldline,
Worldpay,
Xendit,
Zen,
Plaid,
Zsl,
Expand Down
11 changes: 6 additions & 5 deletions crates/common_utils/src/types/theme.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ use crate::id_type;
/// Currently being used for theme related APIs and queries.
#[derive(Debug)]
pub enum ThemeLineage {
/// Tenant lineage variant
Tenant {
/// tenant_id: String
tenant_id: String,
},
// TODO: Add back Tenant variant when we introduce Tenant Variant in EntityType
// /// Tenant lineage variant
// Tenant {
// /// tenant_id: String
// tenant_id: String,
// },
/// Org lineage variant
Organization {
/// tenant_id: String
Expand Down
1 change: 1 addition & 0 deletions crates/connector_configs/src/connector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ pub struct ConnectorConfig {
pub wise_payout: Option<ConnectorTomlConfig>,
pub worldline: Option<ConnectorTomlConfig>,
pub worldpay: Option<ConnectorTomlConfig>,
pub xendit: Option<ConnectorTomlConfig>,
pub square: Option<ConnectorTomlConfig>,
pub stax: Option<ConnectorTomlConfig>,
pub dummy_connector: Option<ConnectorTomlConfig>,
Expand Down
19 changes: 10 additions & 9 deletions crates/diesel_models/src/query/user/theme.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use diesel::{
associations::HasTable,
pg::Pg,
sql_types::{Bool, Nullable},
BoolExpressionMethods, ExpressionMethods, NullableExpressionMethods,
BoolExpressionMethods, ExpressionMethods,
};

use crate::{
Expand All @@ -27,14 +27,15 @@ impl Theme {
+ 'static,
> {
match lineage {
ThemeLineage::Tenant { tenant_id } => Box::new(
dsl::tenant_id
.eq(tenant_id)
.and(dsl::org_id.is_null())
.and(dsl::merchant_id.is_null())
.and(dsl::profile_id.is_null())
.nullable(),
),
// TODO: Add back Tenant variant when we introduce Tenant Variant in EntityType
// ThemeLineage::Tenant { tenant_id } => Box::new(
// dsl::tenant_id
// .eq(tenant_id)
// .and(dsl::org_id.is_null())
// .and(dsl::merchant_id.is_null())
// .and(dsl::profile_id.is_null())
// .nullable(),
// ),
ThemeLineage::Organization { tenant_id, org_id } => Box::new(
dsl::tenant_id
.eq(tenant_id)
Expand Down
4 changes: 4 additions & 0 deletions crates/diesel_models/src/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1280,6 +1280,10 @@ diesel::table! {
profile_id -> Nullable<Varchar>,
created_at -> Timestamp,
last_modified_at -> Timestamp,
#[max_length = 64]
entity_type -> Varchar,
#[max_length = 64]
theme_name -> Varchar,
}
}

Expand Down
4 changes: 4 additions & 0 deletions crates/diesel_models/src/schema_v2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1227,6 +1227,10 @@ diesel::table! {
profile_id -> Nullable<Varchar>,
created_at -> Timestamp,
last_modified_at -> Timestamp,
#[max_length = 64]
entity_type -> Varchar,
#[max_length = 64]
theme_name -> Varchar,
}
}

Expand Down
5 changes: 5 additions & 0 deletions crates/diesel_models/src/user/theme.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use common_enums::EntityType;
use common_utils::id_type;
use diesel::{Identifiable, Insertable, Queryable, Selectable};
use time::PrimitiveDateTime;
Expand All @@ -14,6 +15,8 @@ pub struct Theme {
pub profile_id: Option<id_type::ProfileId>,
pub created_at: PrimitiveDateTime,
pub last_modified_at: PrimitiveDateTime,
pub entity_type: EntityType,
pub theme_name: String,
}

#[derive(Clone, Debug, Insertable, router_derive::DebugAsDisplay)]
Expand All @@ -26,4 +29,6 @@ pub struct ThemeNew {
pub profile_id: Option<id_type::ProfileId>,
pub created_at: PrimitiveDateTime,
pub last_modified_at: PrimitiveDateTime,
pub entity_type: EntityType,
pub theme_name: String,
}
3 changes: 2 additions & 1 deletion crates/hyperswitch_connectors/src/connectors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ pub mod tsys;
pub mod volt;
pub mod worldline;
pub mod worldpay;
pub mod xendit;
pub mod zen;
pub mod zsl;

Expand All @@ -48,5 +49,5 @@ pub use self::{
nexinets::Nexinets, nexixpay::Nexixpay, nomupay::Nomupay, novalnet::Novalnet, payeezy::Payeezy,
payu::Payu, powertranz::Powertranz, razorpay::Razorpay, shift4::Shift4, square::Square,
stax::Stax, taxjar::Taxjar, thunes::Thunes, tsys::Tsys, volt::Volt, worldline::Worldline,
worldpay::Worldpay, zen::Zen, zsl::Zsl,
worldpay::Worldpay, xendit::Xendit, zen::Zen, zsl::Zsl,
};
Loading

0 comments on commit c4d8809

Please sign in to comment.