mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-02 04:04:43 +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 common_utils::ext_traits::{AsyncExt, Encode, ValueExt};
|
||||
use error_stack::{self, ResultExt};
|
||||
use masking::Secret;
|
||||
use router_derive::PaymentOperation;
|
||||
use router_env::{instrument, tracing};
|
||||
use storage_models::ephemeral_key;
|
||||
@ -544,6 +545,7 @@ impl PaymentCreate {
|
||||
.transpose()
|
||||
.change_context(errors::ApiErrorResponse::InternalServerError)
|
||||
.attach_printable("Encoding Metadata to value failed")?;
|
||||
let meta_data = metadata.clone().map(Secret::new);
|
||||
|
||||
let (business_country, business_label) = helpers::get_business_details(
|
||||
request.business_country,
|
||||
@ -573,6 +575,7 @@ impl PaymentCreate {
|
||||
business_country,
|
||||
business_label,
|
||||
active_attempt_id,
|
||||
meta_data,
|
||||
..storage::PaymentIntentNew::default()
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user