mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-02 04:04:43 +08:00
feat(payment_v2): implement payments sync (#6464)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
use common_utils::errors::CustomResult;
|
||||
#[cfg(feature = "v2")]
|
||||
use common_utils::types::keymanager::KeyManagerState;
|
||||
use common_utils::{id_type, types::keymanager::KeyManagerState};
|
||||
use diesel_models::enums as storage_enums;
|
||||
#[cfg(feature = "v2")]
|
||||
use hyperswitch_domain_models::merchant_key_store::MerchantKeyStore;
|
||||
@ -74,7 +74,7 @@ impl PaymentAttemptInterface for MockDb {
|
||||
&self,
|
||||
_key_manager_state: &KeyManagerState,
|
||||
_merchant_key_store: &MerchantKeyStore,
|
||||
_attempt_id: &str,
|
||||
_attempt_id: &id_type::GlobalAttemptId,
|
||||
_storage_scheme: storage_enums::MerchantStorageScheme,
|
||||
) -> error_stack::Result<PaymentAttempt, StorageError> {
|
||||
// [#172]: Implement function for `MockDb`
|
||||
|
||||
@ -95,6 +95,7 @@ impl PaymentIntentInterface for MockDb {
|
||||
Ok(new)
|
||||
}
|
||||
|
||||
#[cfg(feature = "v1")]
|
||||
// safety: only used for testing
|
||||
#[allow(clippy::unwrap_used)]
|
||||
async fn update_payment_intent(
|
||||
@ -130,6 +131,20 @@ impl PaymentIntentInterface for MockDb {
|
||||
Ok(payment_intent.clone())
|
||||
}
|
||||
|
||||
#[cfg(feature = "v2")]
|
||||
// safety: only used for testing
|
||||
#[allow(clippy::unwrap_used)]
|
||||
async fn update_payment_intent(
|
||||
&self,
|
||||
state: &KeyManagerState,
|
||||
this: PaymentIntent,
|
||||
update: PaymentIntentUpdate,
|
||||
key_store: &MerchantKeyStore,
|
||||
_storage_scheme: storage_enums::MerchantStorageScheme,
|
||||
) -> CustomResult<PaymentIntent, StorageError> {
|
||||
todo!()
|
||||
}
|
||||
|
||||
#[cfg(feature = "v1")]
|
||||
// safety: only used for testing
|
||||
#[allow(clippy::unwrap_used)]
|
||||
|
||||
Reference in New Issue
Block a user