mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-02 21:07:58 +08:00
feat: integrate Basilisk locker for storing sensitive data (#34)
Co-authored-by: Manoj Ghorela <manoj.ghorela@manoj.ghorela-MacBookPro>
This commit is contained in:
@ -7,7 +7,7 @@ use super::payments::{helpers, PaymentAddress};
|
||||
use crate::{
|
||||
consts,
|
||||
core::errors::{self, RouterResult},
|
||||
db::{merchant_connector_account::IMerchantConnectorAccount, temp_card::ITempCard},
|
||||
db::merchant_connector_account::IMerchantConnectorAccount,
|
||||
routes::AppState,
|
||||
types::{
|
||||
self, api,
|
||||
@ -52,16 +52,9 @@ pub async fn construct_refund_router_data<'a, F>(
|
||||
.get_required_value("payment_method_type")?;
|
||||
let payment_method_data = match payment_method_data.cloned() {
|
||||
Some(v) => v,
|
||||
None => {
|
||||
let temp_card = db
|
||||
.find_tempcard_by_transaction_id(&payment_attempt.txn_id)
|
||||
.await
|
||||
.change_context(errors::ApiErrorResponse::PaymentMethodNotFound)?
|
||||
.ok_or(errors::ApiErrorResponse::InvalidCardData { data: None })?;
|
||||
helpers::payment_method_data_from_temp_card(&state.conf.keys, temp_card)
|
||||
.await?
|
||||
.get_required_value("payment_method_data")?
|
||||
}
|
||||
None => helpers::Vault::get_payment_method_data_from_locker(state, &payment_attempt.txn_id)
|
||||
.await?
|
||||
.get_required_value("payment_method_data")?,
|
||||
};
|
||||
|
||||
let router_data = types::RouterData {
|
||||
|
||||
Reference in New Issue
Block a user