Decouple Pull payment from wallets (#2987)

* Decouple Pull payments from wallet

* Update _Nav.cshtml

* Fixes
This commit is contained in:
Andrew Camilleri
2021-10-22 04:17:40 +02:00
committed by GitHub
parent db038723f4
commit 9b0d1a23dc
15 changed files with 147 additions and 115 deletions

View File

@@ -63,12 +63,13 @@ namespace Microsoft.AspNetCore.Mvc
scheme, host, pathbase);
}
public static string PayoutLink(this LinkGenerator urlHelper, string walletId,string pullPaymentId, string scheme, HostString host, string pathbase)
public static string PayoutLink(this LinkGenerator urlHelper, string walletIdOrStoreId,string pullPaymentId, string scheme, HostString host, string pathbase)
{
WalletId.TryParse(walletIdOrStoreId, out var wallet);
return urlHelper.GetUriByAction(
action: nameof(WalletsController.Payouts),
controller: "Wallets",
values: new {walletId, pullPaymentId},
action: nameof(StorePullPaymentsController.Payouts),
controller: "StorePullPayments",
values: new {storeId= wallet?.StoreId?? walletIdOrStoreId , pullPaymentId},
scheme, host, pathbase);
}
}