mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-03 21:37:41 +08:00
fix: populate meta_data in payment_intent (#1240)
This commit is contained in:
@ -3,6 +3,7 @@ use std::marker::PhantomData;
|
|||||||
use async_trait::async_trait;
|
use async_trait::async_trait;
|
||||||
use common_utils::ext_traits::{AsyncExt, Encode, ValueExt};
|
use common_utils::ext_traits::{AsyncExt, Encode, ValueExt};
|
||||||
use error_stack::{self, ResultExt};
|
use error_stack::{self, ResultExt};
|
||||||
|
use masking::Secret;
|
||||||
use router_derive::PaymentOperation;
|
use router_derive::PaymentOperation;
|
||||||
use router_env::{instrument, tracing};
|
use router_env::{instrument, tracing};
|
||||||
use storage_models::ephemeral_key;
|
use storage_models::ephemeral_key;
|
||||||
@ -544,6 +545,7 @@ impl PaymentCreate {
|
|||||||
.transpose()
|
.transpose()
|
||||||
.change_context(errors::ApiErrorResponse::InternalServerError)
|
.change_context(errors::ApiErrorResponse::InternalServerError)
|
||||||
.attach_printable("Encoding Metadata to value failed")?;
|
.attach_printable("Encoding Metadata to value failed")?;
|
||||||
|
let meta_data = metadata.clone().map(Secret::new);
|
||||||
|
|
||||||
let (business_country, business_label) = helpers::get_business_details(
|
let (business_country, business_label) = helpers::get_business_details(
|
||||||
request.business_country,
|
request.business_country,
|
||||||
@ -573,6 +575,7 @@ impl PaymentCreate {
|
|||||||
business_country,
|
business_country,
|
||||||
business_label,
|
business_label,
|
||||||
active_attempt_id,
|
active_attempt_id,
|
||||||
|
meta_data,
|
||||||
..storage::PaymentIntentNew::default()
|
..storage::PaymentIntentNew::default()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user