feat: multiple connector account support for the same country (#816)

Co-authored-by: Manoj Ghorela <118727120+manoj-juspay@users.noreply.github.com>
Co-authored-by: Arun Raj M <jarnura47@gmail.com>
This commit is contained in:
Narayan Bhat
2023-04-11 17:25:29 +05:30
committed by GitHub
parent 29da1dfa50
commit 6188d51579
40 changed files with 631 additions and 52 deletions

View File

@ -30,10 +30,18 @@ pub async fn construct_refund_router_data<'a, F>(
creds_identifier: Option<String>,
) -> RouterResult<types::RefundsRouterData<F>> {
let db = &*state.store;
let connector_label = helpers::get_connector_label(
payment_intent.business_country,
&payment_intent.business_label,
None,
connector_id,
);
let merchant_connector_account = helpers::get_merchant_connector_account(
db,
merchant_account.merchant_id.as_str(),
connector_id,
&connector_label,
creds_identifier,
)
.await?;