Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation
Rust adyenbeginner-friendlyfeaturedfinancefintechhacktoberfesthigh-performanceopen-sourceorchestrationpaymentpayment-gatewaypayment-integrationpayment-processingpaymentspayments-platformrestful-apirustsdkstripeworks-with-react
fix(mock_db): insert merchant for mock_db (#1984)
Mani Chandrafb397956adf2
diff --git a/crates/router/src/db/merchant_account.rs b/crates/router/src/db/merchant_account.rsindex db76f94b22..d8bbd911de 100644--- a/crates/router/src/db/merchant_account.rs+++ b/crates/router/src/db/merchant_account.rs@@ -253,10 +253,17 @@ impl MerchantAccountInterface for MockDb {#[allow(clippy::panic)]async fn insert_merchant(&self,- merchant_account: domain::MerchantAccount,+ mut merchant_account: domain::MerchantAccount,merchant_key_store: &domain::MerchantKeyStore,) -> CustomResult<domain::MerchantAccount, errors::StorageError> {let mut accounts = self.merchant_accounts.lock().await;+ merchant_account.id.get_or_insert(+ accounts+ .len()+ .try_into()+ .into_report()+ .change_context(errors::StorageError::MockDbError)?,+ );let account = Conversion::convert(merchant_account).await.change_context(errors::StorageError::EncryptionError)?;