Skip to content

Commit 867da7d

Browse files
authored
Merge branch 'main' into checkout-diff-fix
2 parents d79e4a8 + 1c6b720 commit 867da7d

File tree

2 files changed

+33
-7
lines changed

2 files changed

+33
-7
lines changed

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,24 @@ All notable changes to Connector Service will be documented here.
44

55
- - -
66

7+
## 2025.12.10.0
8+
9+
### Features
10+
11+
- **connector:**
12+
- Trustpay Refund & RSync flow ([#344](https://github.com/juspay/connector-service/pull/344)) ([`505dd74`](https://github.com/juspay/connector-service/commit/505dd74f0844af1af8b81d69a8bbdc1404e9510a))
13+
- Bankofamerica Connector Integration ([#319](https://github.com/juspay/connector-service/pull/319)) ([`96f74dc`](https://github.com/juspay/connector-service/commit/96f74dc93271ac487fd1326d97886c64c1d6bdde))
14+
- [Powertranz] Connector Integration ([#334](https://github.com/juspay/connector-service/pull/334)) ([`98c9b42`](https://github.com/juspay/connector-service/commit/98c9b42c4bc3dded29b9d8bb877715be6005a339))
15+
- **framework:** Implemented Custom HTTP Integration Layer ([#329](https://github.com/juspay/connector-service/pull/329)) ([`afac8b1`](https://github.com/juspay/connector-service/commit/afac8b19c7481b9385ae63ef71b8f435e2fa526a))
16+
17+
### Bug Fixes
18+
19+
- Fixed metadata to accept all values in Authorize flow ([#353](https://github.com/juspay/connector-service/pull/353)) ([`d7db406`](https://github.com/juspay/connector-service/commit/d7db40696d7f5b463df0159856544e6c0d0e7ece))
20+
21+
**Full Changelog:** [`2025.12.09.0...2025.12.10.0`](https://github.com/juspay/connector-service/compare/2025.12.09.0...2025.12.10.0)
22+
23+
- - -
24+
725
## 2025.12.09.0
826

927
### Features

backend/domain_types/src/types.rs

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,20 @@ fn convert_merchant_metadata_to_json(metadata: &HashMap<String, String>) -> serd
5656
serde_json::Value::Object(metadata_map)
5757
}
5858

59+
/// Convert HashMap to JSON Value, deserializing string values that contain JSON
60+
fn convert_metadata_to_json(metadata: &HashMap<String, String>) -> serde_json::Value {
61+
let metadata_map = metadata
62+
.iter()
63+
.fold(serde_json::Map::new(), |mut map, (key, value)| {
64+
// Try to parse the value as JSON first, if it fails, treat it as a plain string
65+
let json_value = serde_json::from_str::<serde_json::Value>(value)
66+
.unwrap_or_else(|_| serde_json::Value::String(value.clone()));
67+
map.insert(key.clone(), json_value);
68+
map
69+
});
70+
serde_json::Value::Object(metadata_map)
71+
}
72+
5973
// For decoding connector_meta_data and Engine trait - base64 crate no longer needed here
6074
use crate::{
6175
connector_flow::{
@@ -1685,13 +1699,7 @@ impl<
16851699
metadata: if value.metadata.is_empty() {
16861700
None
16871701
} else {
1688-
Some(serde_json::Value::Object(
1689-
value
1690-
.metadata
1691-
.into_iter()
1692-
.map(|(k, v)| (k, serde_json::Value::String(v)))
1693-
.collect(),
1694-
))
1702+
Some(convert_metadata_to_json(&value.metadata))
16951703
},
16961704
merchant_order_reference_id: value.merchant_order_reference_id,
16971705
order_tax_amount: None,

0 commit comments

Comments
 (0)