refactor: introducing hyperswitch_interface crates (#3536)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
Chethan Rao
2024-02-12 13:30:44 +05:30
committed by GitHub
parent 33df3520d1
commit b6754a7de8
44 changed files with 1157 additions and 628 deletions

View File

@ -349,14 +349,15 @@ async fn store_bank_details_in_payment_methods(
let pm_auth_key = async {
#[cfg(feature = "hashicorp-vault")]
let client = external_services::hashicorp_vault::get_hashicorp_client(&state.conf.hc_vault)
.await
.change_context(ApiErrorResponse::InternalServerError)
.attach_printable("Failed while creating client")?;
let client =
external_services::hashicorp_vault::core::get_hashicorp_client(&state.conf.hc_vault)
.await
.change_context(ApiErrorResponse::InternalServerError)
.attach_printable("Failed while creating client")?;
#[cfg(feature = "hashicorp-vault")]
let output = masking::Secret::new(state.conf.payment_method_auth.pm_auth_key.clone())
.fetch_inner::<hashicorp_vault::Kv2>(client)
.fetch_inner::<hashicorp_vault::core::Kv2>(client)
.await
.change_context(ApiErrorResponse::InternalServerError)?
.expose();
@ -369,7 +370,7 @@ async fn store_bank_details_in_payment_methods(
.await?;
#[cfg(feature = "aws_kms")]
let pm_auth_key = aws_kms::get_aws_kms_client(&state.conf.kms)
let pm_auth_key = aws_kms::core::get_aws_kms_client(&state.conf.kms)
.await
.decrypt(pm_auth_key)
.await