mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-03 13:30:39 +08:00
refactor(merchant_account_v2): recreate id and remove deprecated fields from merchant account (#5493)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
use common_utils::ext_traits::ValueExt;
|
||||
use common_utils::ext_traits::{OptionExt, ValueExt};
|
||||
use error_stack::ResultExt;
|
||||
use router_env::tracing::{self, instrument};
|
||||
|
||||
@ -26,17 +26,13 @@ pub async fn construct_fulfillment_router_data<'a>(
|
||||
connector: String,
|
||||
fulfillment_request: FrmFulfillmentRequest,
|
||||
) -> RouterResult<FrmFulfillmentRouterData> {
|
||||
let profile_id = core_utils::get_profile_id_from_business_details(
|
||||
payment_intent.business_country,
|
||||
payment_intent.business_label.as_ref(),
|
||||
merchant_account,
|
||||
payment_intent.profile_id.as_ref(),
|
||||
&*state.store,
|
||||
false,
|
||||
)
|
||||
.await
|
||||
.change_context(errors::ApiErrorResponse::InternalServerError)
|
||||
.attach_printable("profile_id is not set in payment_intent")?;
|
||||
let profile_id = payment_intent
|
||||
.profile_id
|
||||
.as_ref()
|
||||
.get_required_value("profile_id")
|
||||
.change_context(errors::ApiErrorResponse::InternalServerError)
|
||||
.attach_printable("profile_id is not set in payment_intent")?
|
||||
.clone();
|
||||
|
||||
let merchant_connector_account = helpers::get_merchant_connector_account(
|
||||
state,
|
||||
|
||||
Reference in New Issue
Block a user