mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-28 12:15:40 +08:00
feat(core): google pay decrypt flow (#6991)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com> Co-authored-by: Gnanasundari24 <118818938+Gnanasundari24@users.noreply.github.com>
This commit is contained in:
@ -203,8 +203,20 @@ pub mod timestamp {
|
||||
|
||||
/// <https://github.com/serde-rs/serde/issues/994#issuecomment-316895860>
|
||||
pub mod json_string {
|
||||
use serde::de::{self, Deserialize, DeserializeOwned, Deserializer};
|
||||
use serde_json;
|
||||
use serde::{
|
||||
de::{self, Deserialize, DeserializeOwned, Deserializer},
|
||||
ser::{self, Serialize, Serializer},
|
||||
};
|
||||
|
||||
/// Serialize a type to json_string format
|
||||
pub fn serialize<T, S>(value: &T, serializer: S) -> Result<S::Ok, S::Error>
|
||||
where
|
||||
T: Serialize,
|
||||
S: Serializer,
|
||||
{
|
||||
let j = serde_json::to_string(value).map_err(ser::Error::custom)?;
|
||||
j.serialize(serializer)
|
||||
}
|
||||
|
||||
/// Deserialize a string which is in json format
|
||||
pub fn deserialize<'de, T, D>(deserializer: D) -> Result<T, D::Error>
|
||||
|
||||
@ -35,6 +35,8 @@ pub mod hashing;
|
||||
#[cfg(feature = "metrics")]
|
||||
pub mod metrics;
|
||||
|
||||
pub use base64_serializer::Base64Serializer;
|
||||
|
||||
/// Date-time utilities.
|
||||
pub mod date_time {
|
||||
#[cfg(feature = "async_ext")]
|
||||
@ -296,6 +298,14 @@ pub trait DbConnectionParams {
|
||||
}
|
||||
}
|
||||
|
||||
// Can't add doc comments for macro invocations, neither does the macro allow it.
|
||||
#[allow(missing_docs)]
|
||||
mod base64_serializer {
|
||||
use base64_serde::base64_serde_type;
|
||||
|
||||
base64_serde_type!(pub Base64Serializer, crate::consts::BASE64_ENGINE);
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod nanoid_tests {
|
||||
#![allow(clippy::unwrap_used)]
|
||||
|
||||
Reference in New Issue
Block a user