Skip to content

Commit

Permalink
Merge branch 'main' of github.com:juspay/hyperswitch into assertion-r…
Browse files Browse the repository at this point in the history
…efactor

* 'main' of github.com:juspay/hyperswitch:
  chore(version): 2024.05.10.0
  fix(router): [NETCETERA] skip sending browser_information in authentication request for app device_channel (#4613)
  fix(users): Fix bugs caused by the new token only flows (#4607)
  ci(cypress): Fix card expiry for savecard flows (#4585)
  refactor(billing): store `payment_method_data_billing` for recurring payments (#4513)
  feat(users): new routes to accept invite and list merchants (#4591)
  fix(connector): [BAMBORA] Audit Fixes for Bambora (#4604)
  fix(connector): [iatapay]handle empty error response in case of 401 (#4291)
  feat(connector): [Payone] add connector template code (#4469)
  feat(users): Create API to Verify TOTP (#4597)
  chore(version): 2024.05.09.0
  chore(postman): update Postman collection files
  fix(core): drop three_dsserver_trans_id from authentication table (#4587)
  refactor(db): Add TenantId field to the KafkaStore struct (#4512)
  feat(users): Create `user_key_store` table and `begin_totp` API (#4577)
  Fix(connector): [BOA/CYBS] make rsync status optional (#4570)
  fix(users): Correct the condition for `verify_email` flow in decision manger (#4580)
  • Loading branch information
PiX committed May 10, 2024
2 parents 217cd7b + ecdac81 commit cc259e9
Show file tree
Hide file tree
Showing 118 changed files with 3,633 additions and 980 deletions.
52 changes: 52 additions & 0 deletions CHANGELOG.md
Expand Up @@ -4,6 +4,58 @@ All notable changes to HyperSwitch will be documented here.

- - -

## 2024.05.10.0

### Features

- **connector:** [Payone] add connector template code ([#4469](https://github.com/juspay/hyperswitch/pull/4469)) ([`f386f42`](https://github.com/juspay/hyperswitch/commit/f386f423c0e5fac55a24756d7ee7a3ce1c20fb13))
- **users:**
- Create API to Verify TOTP ([#4597](https://github.com/juspay/hyperswitch/pull/4597)) ([`9135423`](https://github.com/juspay/hyperswitch/commit/91354232e03a8dbd9ad9eccc8620eac321765dd7))
- New routes to accept invite and list merchants ([#4591](https://github.com/juspay/hyperswitch/pull/4591)) ([`e70d58a`](https://github.com/juspay/hyperswitch/commit/e70d58afc941d436aae0aaa683c2e8b5db2ade33))

### Bug Fixes

- **connector:**
- [iatapay]handle empty error response in case of 401 ([#4291](https://github.com/juspay/hyperswitch/pull/4291)) ([`d1404d9`](https://github.com/juspay/hyperswitch/commit/d1404d9aff2aea513a2ffd422c7e10e760b7382c))
- [BAMBORA] Audit Fixes for Bambora ([#4604](https://github.com/juspay/hyperswitch/pull/4604)) ([`366596f`](https://github.com/juspay/hyperswitch/commit/366596f14d6c874a8e2d418a99beb90046c5b040))
- **router:** [NETCETERA] skip sending browser_information in authentication request for app device_channel ([#4613](https://github.com/juspay/hyperswitch/pull/4613)) ([`d2a496c`](https://github.com/juspay/hyperswitch/commit/d2a496cf4ddab94efa5ad1127a94687d45bed027))
- **users:** Fix bugs caused by the new token only flows ([#4607](https://github.com/juspay/hyperswitch/pull/4607)) ([`a0f11d7`](https://github.com/juspay/hyperswitch/commit/a0f11d79add17e0bc19d8677c90f8a35d6c99c97))

### Refactors

- **billing:** Store `payment_method_data_billing` for recurring payments ([#4513](https://github.com/juspay/hyperswitch/pull/4513)) ([`55ae0fc`](https://github.com/juspay/hyperswitch/commit/55ae0fc5f704d8b35815fcd2170befb4a726ea8d))

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

- - -

## 2024.05.09.0

### Features

- **business_profile:** Feature add a config to use `billing` as `payment_method_billing` ([#4557](https://github.com/juspay/hyperswitch/pull/4557)) ([`3e1c7eb`](https://github.com/juspay/hyperswitch/commit/3e1c7eba49de3110a2d71cea8e0540c7182d2058))
- **connector-configs:** [Cashtocode] add CNY currency for evoucher ([#4578](https://github.com/juspay/hyperswitch/pull/4578)) ([`c47cac8`](https://github.com/juspay/hyperswitch/commit/c47cac815792df865e416d5ffc6c46faf6662053))
- **users:** Create `user_key_store` table and `begin_totp` API ([#4577](https://github.com/juspay/hyperswitch/pull/4577)) ([`a97016f`](https://github.com/juspay/hyperswitch/commit/a97016fea41c3b74149d8eaa5c0271ec1347bc39))

### Bug Fixes

- **connector:** [BOA/CYBS] make rsync status optional ([#4570](https://github.com/juspay/hyperswitch/pull/4570)) ([`339da8b`](https://github.com/juspay/hyperswitch/commit/339da8b0c9a1e388b65ff5d82a162e758c85ec6b))
- **core:** Drop three_dsserver_trans_id from authentication table ([#4587](https://github.com/juspay/hyperswitch/pull/4587)) ([`ec3b60e`](https://github.com/juspay/hyperswitch/commit/ec3b60e37c0b178c3e5e3fe79db88f83fd195722))
- **users:** Correct the condition for `verify_email` flow in decision manger ([#4580](https://github.com/juspay/hyperswitch/pull/4580)) ([`3db5b82`](https://github.com/juspay/hyperswitch/commit/3db5b82d0de45130695e1a47b9e71473020fd84d))

### Refactors

- **bank-debit:** Remove billingdetails from bankdebit pmd ([#4371](https://github.com/juspay/hyperswitch/pull/4371)) ([`625b531`](https://github.com/juspay/hyperswitch/commit/625b53182e20b50fde5def338e122a43457da0f2))
- **db:** Add TenantId field to the KafkaStore struct ([#4512](https://github.com/juspay/hyperswitch/pull/4512)) ([`dca15ae`](https://github.com/juspay/hyperswitch/commit/dca15aeeb501a499fd7334d5cc68b8053757cad4))

### Miscellaneous Tasks

- **postman:** Update Postman collection files ([`d85f245`](https://github.com/juspay/hyperswitch/commit/d85f245182875dcc59d8355cd07c91bfaaf08e1a))

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

- - -

## 2024.05.08.0

### Features
Expand Down
31 changes: 30 additions & 1 deletion Cargo.lock

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

1 change: 1 addition & 0 deletions config/config.example.toml
Expand Up @@ -208,6 +208,7 @@ opayo.base_url = "https://pi-test.sagepay.com/"
opennode.base_url = "https://dev-api.opennode.com"
payeezy.base_url = "https://api-cert.payeezy.com/"
payme.base_url = "https://sandbox.payme.io/"
payone.base_url = "https://payment.preprod.payone.com/"
paypal.base_url = "https://api-m.sandbox.paypal.com/"
payu.base_url = "https://secure.snd.payu.com/"
placetopay.base_url = "https://test.placetopay.com/rest/gateway"
Expand Down
1 change: 1 addition & 0 deletions config/deployments/integration_test.toml
Expand Up @@ -62,6 +62,7 @@ opayo.base_url = "https://pi-test.sagepay.com/"
opennode.base_url = "https://dev-api.opennode.com"
payeezy.base_url = "https://api-cert.payeezy.com/"
payme.base_url = "https://sandbox.payme.io/"
payone.base_url = "https://payment.preprod.payone.com/"
paypal.base_url = "https://api-m.sandbox.paypal.com/"
payu.base_url = "https://secure.snd.payu.com/"
placetopay.base_url = "https://test.placetopay.com/rest/gateway"
Expand Down
1 change: 1 addition & 0 deletions config/deployments/production.toml
Expand Up @@ -66,6 +66,7 @@ opayo.base_url = "https://pi-live.sagepay.com/"
opennode.base_url = "https://api.opennode.com"
payeezy.base_url = "https://api.payeezy.com/"
payme.base_url = "https://live.payme.io/"
payone.base_url = "https://payment.payone.com/"
paypal.base_url = "https://api-m.paypal.com/"
payu.base_url = "https://secure.payu.com/api/"
placetopay.base_url = "https://checkout.placetopay.com/rest/gateway"
Expand Down
1 change: 1 addition & 0 deletions config/deployments/sandbox.toml
Expand Up @@ -66,6 +66,7 @@ opayo.base_url = "https://pi-test.sagepay.com/"
opennode.base_url = "https://dev-api.opennode.com"
payeezy.base_url = "https://api-cert.payeezy.com/"
payme.base_url = "https://sandbox.payme.io/"
payone.base_url = "https://payment.preprod.payone.com/"
paypal.base_url = "https://api-m.sandbox.paypal.com/"
payu.base_url = "https://secure.snd.payu.com/"
placetopay.base_url = "https://test.placetopay.com/rest/gateway"
Expand Down
2 changes: 2 additions & 0 deletions config/development.toml
Expand Up @@ -128,6 +128,7 @@ cards = [
"opennode",
"payeezy",
"payme",
"payone",
"paypal",
"payu",
"placetopay",
Expand Down Expand Up @@ -208,6 +209,7 @@ opayo.base_url = "https://pi-test.sagepay.com/"
opennode.base_url = "https://dev-api.opennode.com"
payeezy.base_url = "https://api-cert.payeezy.com/"
payme.base_url = "https://sandbox.payme.io/"
payone.base_url = "https://payment.preprod.payone.com/"
paypal.base_url = "https://api-m.sandbox.paypal.com/"
payu.base_url = "https://secure.snd.payu.com/"
placetopay.base_url = "https://test.placetopay.com/rest/gateway"
Expand Down
2 changes: 2 additions & 0 deletions config/docker_compose.toml
Expand Up @@ -145,6 +145,7 @@ opayo.base_url = "https://pi-test.sagepay.com/"
opennode.base_url = "https://dev-api.opennode.com"
payeezy.base_url = "https://api-cert.payeezy.com/"
payme.base_url = "https://sandbox.payme.io/"
payone.base_url = "https://payment.preprod.payone.com/"
paypal.base_url = "https://api-m.sandbox.paypal.com/"
payu.base_url = "https://secure.snd.payu.com/"
placetopay.base_url = "https://test.placetopay.com/rest/gateway"
Expand Down Expand Up @@ -216,6 +217,7 @@ cards = [
"opennode",
"payeezy",
"payme",
"payone",
"paypal",
"payu",
"placetopay",
Expand Down
2 changes: 2 additions & 0 deletions crates/api_models/src/enums.rs
Expand Up @@ -110,6 +110,7 @@ pub enum Connector {
Opennode,
// Payeezy, As psync and rsync are not supported by this connector, it is added as template code for future usage
Payme,
// Payone, added as template code for future usage
Paypal,
Payu,
Placetopay,
Expand Down Expand Up @@ -218,6 +219,7 @@ impl Connector {
| Self::Nuvei
| Self::Opennode
| Self::Payme
// | Self::Payone Added as a template code for future usage
| Self::Paypal
| Self::Payu
| Self::Placetopay
Expand Down
19 changes: 11 additions & 8 deletions crates/api_models/src/events/user.rs
Expand Up @@ -10,13 +10,14 @@ use crate::user::{
dashboard_metadata::{
GetMetaDataRequest, GetMetaDataResponse, GetMultipleMetaDataPayload, SetMetaDataRequest,
},
AcceptInviteFromEmailRequest, AuthorizeResponse, ChangePasswordRequest, ConnectAccountRequest,
CreateInternalUserRequest, DashboardEntryResponse, ForgotPasswordRequest,
GetUserDetailsResponse, GetUserRoleDetailsRequest, GetUserRoleDetailsResponse,
InviteUserRequest, ListUsersResponse, ReInviteUserRequest, ResetPasswordRequest,
RotatePasswordRequest, SendVerifyEmailRequest, SignInResponse, SignUpRequest,
SignUpWithMerchantIdRequest, SwitchMerchantIdRequest, TokenOrPayloadResponse, TokenResponse,
UpdateUserAccountDetailsRequest, UserFromEmailRequest, UserMerchantCreate, VerifyEmailRequest,
AcceptInviteFromEmailRequest, AuthorizeResponse, BeginTotpResponse, ChangePasswordRequest,
ConnectAccountRequest, CreateInternalUserRequest, DashboardEntryResponse,
ForgotPasswordRequest, GetUserDetailsResponse, GetUserRoleDetailsRequest,
GetUserRoleDetailsResponse, InviteUserRequest, ListUsersResponse, ReInviteUserRequest,
ResetPasswordRequest, RotatePasswordRequest, SendVerifyEmailRequest, SignInResponse,
SignUpRequest, SignUpWithMerchantIdRequest, SwitchMerchantIdRequest, TokenOrPayloadResponse,
TokenResponse, UpdateUserAccountDetailsRequest, UserFromEmailRequest, UserMerchantCreate,
VerifyEmailRequest, VerifyTotpRequest,
};

impl ApiEventMetric for DashboardEntryResponse {
Expand Down Expand Up @@ -72,7 +73,9 @@ common_utils::impl_misc_api_event_type!(
GetUserRoleDetailsRequest,
GetUserRoleDetailsResponse,
TokenResponse,
UserFromEmailRequest
UserFromEmailRequest,
BeginTotpResponse,
VerifyTotpRequest
);

#[cfg(feature = "dummy_connector")]
Expand Down
3 changes: 2 additions & 1 deletion crates/api_models/src/events/user_role.rs
Expand Up @@ -7,14 +7,15 @@ use crate::user_role::{
UpdateRoleRequest,
},
AcceptInvitationRequest, AuthorizationInfoResponse, DeleteUserRoleRequest,
TransferOrgOwnershipRequest, UpdateUserRoleRequest,
MerchantSelectRequest, TransferOrgOwnershipRequest, UpdateUserRoleRequest,
};

common_utils::impl_misc_api_event_type!(
RoleInfoWithPermissionsResponse,
GetRoleRequest,
AuthorizationInfoResponse,
UpdateUserRoleRequest,
MerchantSelectRequest,
AcceptInvitationRequest,
DeleteUserRoleRequest,
TransferOrgOwnershipRequest,
Expand Down
4 changes: 4 additions & 0 deletions crates/api_models/src/payment_methods.rs
Expand Up @@ -951,6 +951,10 @@ pub struct CustomerPaymentMethod {
/// Indicates if the payment method has been set to default or not
#[schema(example = true)]
pub default_payment_method_set: bool,

/// The billing details of the payment method
#[schema(value_type = Option<Address>)]
pub billing: Option<payments::Address>,
}

#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, ToSchema)]
Expand Down
18 changes: 17 additions & 1 deletion crates/api_models/src/user.rs
Expand Up @@ -236,8 +236,24 @@ pub enum TokenOrPayloadResponse<T> {
Token(TokenResponse),
Payload(T),
}

#[derive(Debug, serde::Deserialize, serde::Serialize)]
pub struct UserFromEmailRequest {
pub token: Secret<String>,
}

#[derive(Debug, serde::Deserialize, serde::Serialize)]
pub struct BeginTotpResponse {
pub secret: Option<TotpSecret>,
}

#[derive(Debug, serde::Deserialize, serde::Serialize)]
pub struct TotpSecret {
pub secret: Secret<String>,
pub totp_url: Secret<String>,
pub recovery_codes: Vec<Secret<String>>,
}

#[derive(Debug, serde::Deserialize, serde::Serialize)]
pub struct VerifyTotpRequest {
pub totp: Option<Secret<String>>,
}
6 changes: 5 additions & 1 deletion crates/api_models/src/user_role.rs
Expand Up @@ -97,11 +97,15 @@ pub enum UserStatus {
}

#[derive(Debug, serde::Deserialize, serde::Serialize)]
pub struct AcceptInvitationRequest {
pub struct MerchantSelectRequest {
pub merchant_ids: Vec<String>,
// TODO: Remove this once the token only api is being used
pub need_dashboard_entry_response: Option<bool>,
}
#[derive(Debug, serde::Deserialize, serde::Serialize)]
pub struct AcceptInvitationRequest {
pub merchant_ids: Vec<String>,
}

#[derive(Debug, serde::Deserialize, serde::Serialize)]
pub struct DeleteUserRoleRequest {
Expand Down
1 change: 1 addition & 0 deletions crates/common_enums/src/enums.rs
Expand Up @@ -148,6 +148,7 @@ pub enum RoutableConnectors {
Opennode,
// Payeezy, As psync and rsync are not supported by this connector, it is added as template code for future usage
Payme,
Payone,
Paypal,
Payu,
Placetopay,
Expand Down
17 changes: 0 additions & 17 deletions crates/connector_configs/toml/development.toml
Expand Up @@ -398,26 +398,9 @@ merchant_secret="Source verification key"
payment_method_type = "CartesBancaires"
[[bambora.debit]]
payment_method_type = "UnionPay"
[[bambora.wallet]]
payment_method_type = "apple_pay"
[[bambora.wallet]]
payment_method_type = "paypal"
[bambora.connector_auth.BodyKey]
api_key="Passcode"
key1="Merchant Id"
[bambora.connector_webhook_details]
merchant_secret="Source verification key"
[bambora.metadata.apple_pay.session_token_data]
certificate="Merchant Certificate (Base64 Encoded)"
certificate_keys="Merchant PrivateKey (Base64 Encoded)"
merchant_identifier="Apple Merchant Identifier"
display_name="Display Name"
initiative="Domain"
initiative_context="Domain Name"
[bambora.metadata.apple_pay.payment_request_data]
supported_networks=["visa","masterCard","amex","discover"]
merchant_capabilities=["supports3DS"]
label="apple"

[bankofamerica]
[[bankofamerica.credit]]
Expand Down
18 changes: 0 additions & 18 deletions crates/connector_configs/toml/production.toml
Expand Up @@ -416,27 +416,9 @@ merchant_config_currency="Currency"
payment_method_type = "CartesBancaires"
[[bambora.debit]]
payment_method_type = "UnionPay"
[[bambora.wallet]]
payment_method_type = "apple_pay"
[[bambora.wallet]]
payment_method_type = "paypal"
[bambora.connector_auth.BodyKey]
api_key="Passcode"
key1="Merchant Id"
[bambora.connector_webhook_details]
merchant_secret="Source verification key"

[bambora.metadata.apple_pay.session_token_data]
certificate="Merchant Certificate (Base64 Encoded)"
certificate_keys="Merchant PrivateKey (Base64 Encoded)"
merchant_identifier="Apple Merchant Identifier"
display_name="Display Name"
initiative="Domain"
initiative_context="Domain Name"
[bambora.metadata.apple_pay.payment_request_data]
supported_networks=["visa","masterCard","amex","discover"]
merchant_capabilities=["supports3DS"]
label="apple"

[bankofamerica]
[[bankofamerica.credit]]
Expand Down
17 changes: 0 additions & 17 deletions crates/connector_configs/toml/sandbox.toml
Expand Up @@ -398,26 +398,9 @@ merchant_secret="Source verification key"
payment_method_type = "CartesBancaires"
[[bambora.debit]]
payment_method_type = "UnionPay"
[[bambora.wallet]]
payment_method_type = "apple_pay"
[[bambora.wallet]]
payment_method_type = "paypal"
[bambora.connector_auth.BodyKey]
api_key="Passcode"
key1="Merchant Id"
[bambora.connector_webhook_details]
merchant_secret="Source verification key"
[bambora.metadata.apple_pay.session_token_data]
certificate="Merchant Certificate (Base64 Encoded)"
certificate_keys="Merchant PrivateKey (Base64 Encoded)"
merchant_identifier="Apple Merchant Identifier"
display_name="Display Name"
initiative="Domain"
initiative_context="Domain Name"
[bambora.metadata.apple_pay.payment_request_data]
supported_networks=["visa","masterCard","amex","discover"]
merchant_capabilities=["supports3DS"]
label="apple"

[bankofamerica]
[[bankofamerica.credit]]
Expand Down

0 comments on commit cc259e9

Please sign in to comment.