Skip to content

Commit 5387142

Browse files
committed
Merge branch 'main' of https://github.com/juspay/hyperswitch into clone-connector
2 parents 52a55f8 + 46e830a commit 5387142

File tree

14 files changed

+1429
-409
lines changed

14 files changed

+1429
-409
lines changed

CHANGELOG.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,33 @@
22

33
All notable changes to HyperSwitch will be documented here.
44

5+
- - -
6+
7+
## 2025.05.14.0
8+
9+
### Features
10+
11+
- **refunds_v2:** Add refund update core flow in v2 apis ([#7724](https://github.com/juspay/hyperswitch/pull/7724)) ([`04dc14a`](https://github.com/juspay/hyperswitch/commit/04dc14a93022d03d74b02ae244ee8bb8afa50c27))
12+
- **router:** Add outgoing payment webhooks for v2 ([#6613](https://github.com/juspay/hyperswitch/pull/6613)) ([`aa6ebf8`](https://github.com/juspay/hyperswitch/commit/aa6ebf8aeff5e7c6fc49beb161ecb2038472c3a5))
13+
- **users:** Store and retrieve lineage_context from DB instead of Redis ([#7940](https://github.com/juspay/hyperswitch/pull/7940)) ([`6f22a93`](https://github.com/juspay/hyperswitch/commit/6f22a9306ce75a3f7c92e17f260107c044c16063))
14+
15+
### Bug Fixes
16+
17+
- **connector:** [stripe] fix bank redirect (`bancontact_card`) recurring mandate ([#7990](https://github.com/juspay/hyperswitch/pull/7990)) ([`40fd473`](https://github.com/juspay/hyperswitch/commit/40fd473989b04f70c1dc78025a555a972ffe2596))
18+
19+
### Refactors
20+
21+
- **Connector:** [signifyd,threedsecureio,wellsfargopayout,wise] move from routers to hyperswitch_connectors ([#7953](https://github.com/juspay/hyperswitch/pull/7953)) ([`1dabfe3`](https://github.com/juspay/hyperswitch/commit/1dabfe3e2c0d9b72e41a5bd61c5a394248b7997b))
22+
- **paymentMethods:** Move all pm migration related changes to payment methods crate ([#7786](https://github.com/juspay/hyperswitch/pull/7786)) ([`9c8cf93`](https://github.com/juspay/hyperswitch/commit/9c8cf93662edd7ff10552153b9697186cdb2ad5c))
23+
24+
### Miscellaneous Tasks
25+
26+
- **users:** Add hubspot tracking to prod intent ([#7798](https://github.com/juspay/hyperswitch/pull/7798)) ([`67f38f8`](https://github.com/juspay/hyperswitch/commit/67f38f864e963a41667142a6042ab7b0e557eb2c))
27+
- Resolve v2 warnings in common_utils ([#7358](https://github.com/juspay/hyperswitch/pull/7358)) ([`338a953`](https://github.com/juspay/hyperswitch/commit/338a95372c846ca8e313218be3101bb3e2744063))
28+
29+
**Full Changelog:** [`2025.05.13.0...2025.05.14.0`](https://github.com/juspay/hyperswitch/compare/2025.05.13.0...2025.05.14.0)
30+
31+
532
- - -
633

734
## 2025.05.13.0

crates/api_models/src/payments.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5572,7 +5572,7 @@ pub struct ErrorDetails {
55725572

55735573
/// Token information that can be used to initiate transactions by the merchant.
55745574
#[cfg(feature = "v2")]
5575-
#[derive(Debug, Serialize, ToSchema)]
5575+
#[derive(Debug, Clone, Serialize, ToSchema)]
55765576
pub struct ConnectorTokenDetails {
55775577
/// A token that can be used to make payments directly with the connector.
55785578
#[schema(example = "pm_9UhMqBMEOooRIvJFFdeW")]
@@ -5588,7 +5588,7 @@ pub struct ConnectorTokenDetails {
55885588
/// For example
55895589
/// shipping, billing, customer, payment_method
55905590
#[cfg(feature = "v2")]
5591-
#[derive(Debug, serde::Serialize, ToSchema)]
5591+
#[derive(Debug, Clone, serde::Serialize, ToSchema)]
55925592
pub struct PaymentsResponse {
55935593
/// Unique identifier for the payment. This ensures idempotency for multiple payments
55945594
/// that have been done by a single merchant.

crates/api_models/src/webhooks.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ pub enum OutgoingWebhookContent {
348348
PayoutDetails(Box<payouts::PayoutCreateResponse>),
349349
}
350350

351-
#[derive(Debug, Serialize, ToSchema)]
351+
#[derive(Debug, Clone, Serialize, ToSchema)]
352352
#[serde(tag = "type", content = "object", rename_all = "snake_case")]
353353
#[cfg(feature = "v2")]
354354
pub enum OutgoingWebhookContent {

crates/diesel_models/src/events.rs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,21 +65,39 @@ pub struct Event {
6565
#[derive(Clone, Debug, Deserialize, Serialize, AsExpression, diesel::FromSqlRow)]
6666
#[diesel(sql_type = diesel::sql_types::Jsonb)]
6767
pub enum EventMetadata {
68+
#[cfg(feature = "v1")]
6869
Payment {
6970
payment_id: common_utils::id_type::PaymentId,
7071
},
72+
#[cfg(feature = "v2")]
73+
Payment {
74+
payment_id: common_utils::id_type::GlobalPaymentId,
75+
},
7176
Payout {
7277
payout_id: String,
7378
},
79+
#[cfg(feature = "v1")]
7480
Refund {
7581
payment_id: common_utils::id_type::PaymentId,
7682
refund_id: String,
7783
},
84+
#[cfg(feature = "v2")]
85+
Refund {
86+
payment_id: common_utils::id_type::GlobalPaymentId,
87+
refund_id: common_utils::id_type::GlobalRefundId,
88+
},
89+
#[cfg(feature = "v1")]
7890
Dispute {
7991
payment_id: common_utils::id_type::PaymentId,
8092
attempt_id: String,
8193
dispute_id: String,
8294
},
95+
#[cfg(feature = "v2")]
96+
Dispute {
97+
payment_id: common_utils::id_type::GlobalPaymentId,
98+
attempt_id: String,
99+
dispute_id: String,
100+
},
83101
Mandate {
84102
payment_method_id: String,
85103
mandate_id: String,

crates/hyperswitch_domain_models/src/business_profile.rs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ use common_utils::{
55
date_time,
66
encryption::Encryption,
77
errors::{CustomResult, ValidationError},
8+
ext_traits::OptionExt,
89
pii, type_name,
910
types::keymanager,
1011
};
@@ -17,7 +18,7 @@ use diesel_models::business_profile::{
1718
ExternalVaultConnectorDetails, RevenueRecoveryAlgorithmData,
1819
};
1920
use error_stack::ResultExt;
20-
use masking::{PeekInterface, Secret};
21+
use masking::{ExposeInterface, PeekInterface, Secret};
2122

2223
use crate::type_encryption::{crypto_operation, AsyncLift, CryptoOperation};
2324

@@ -1044,6 +1045,14 @@ impl Profile {
10441045
pub fn get_order_fulfillment_time(&self) -> Option<i64> {
10451046
self.order_fulfillment_time
10461047
}
1048+
1049+
pub fn get_webhook_url_from_profile(&self) -> CustomResult<String, ValidationError> {
1050+
self.webhook_details
1051+
.clone()
1052+
.and_then(|details| details.webhook_url)
1053+
.get_required_value("webhook_details.webhook_url")
1054+
.map(ExposeInterface::expose)
1055+
}
10471056
}
10481057

10491058
#[cfg(feature = "v2")]

0 commit comments

Comments
 (0)