mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-30 01:27:31 +08:00
fix(router): adding connector_customer_id for external vault proxy (#9263)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -312,14 +312,28 @@ impl<F: Clone + Send + Sync> Domain<F, ExternalVaultProxyPaymentsRequest, Paymen
|
|||||||
{
|
{
|
||||||
async fn get_customer_details<'a>(
|
async fn get_customer_details<'a>(
|
||||||
&'a self,
|
&'a self,
|
||||||
_state: &SessionState,
|
state: &SessionState,
|
||||||
_payment_data: &mut PaymentConfirmData<F>,
|
payment_data: &mut PaymentConfirmData<F>,
|
||||||
_merchant_key_store: &domain::MerchantKeyStore,
|
merchant_key_store: &domain::MerchantKeyStore,
|
||||||
_storage_scheme: storage_enums::MerchantStorageScheme,
|
storage_scheme: storage_enums::MerchantStorageScheme,
|
||||||
) -> CustomResult<(BoxedConfirmOperation<'a, F>, Option<domain::Customer>), errors::StorageError>
|
) -> CustomResult<(BoxedConfirmOperation<'a, F>, Option<domain::Customer>), errors::StorageError>
|
||||||
{
|
{
|
||||||
// TODO: Implement external vault specific customer details retrieval
|
match payment_data.payment_intent.customer_id.clone() {
|
||||||
Ok((Box::new(self), None))
|
Some(id) => {
|
||||||
|
let customer = state
|
||||||
|
.store
|
||||||
|
.find_customer_by_global_id(
|
||||||
|
&state.into(),
|
||||||
|
&id,
|
||||||
|
merchant_key_store,
|
||||||
|
storage_scheme,
|
||||||
|
)
|
||||||
|
.await?;
|
||||||
|
|
||||||
|
Ok((Box::new(self), Some(customer)))
|
||||||
|
}
|
||||||
|
None => Ok((Box::new(self), None)),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[instrument(skip_all)]
|
#[instrument(skip_all)]
|
||||||
|
|||||||
Reference in New Issue
Block a user