diff --git a/ElectronicsShop/ElectronicsShopRestAPI/Controllers/ClientController.cs b/ElectronicsShop/ElectronicsShopRestAPI/Controllers/ClientController.cs index 9a75de5..665dbe2 100644 --- a/ElectronicsShop/ElectronicsShopRestAPI/Controllers/ClientController.cs +++ b/ElectronicsShop/ElectronicsShopRestAPI/Controllers/ClientController.cs @@ -57,7 +57,7 @@ namespace ElectronicsShopRestAPI.Controllers { } } - [HttpGet] + [HttpPost] public void CreatePaymeant (PaymeantBindingModel model) { try { _payLogic.CreatePay(model); diff --git a/ElectronicsShop/ElectronicsShopShopClientApp/Controllers/HomeController.cs b/ElectronicsShop/ElectronicsShopShopClientApp/Controllers/HomeController.cs index befbfdc..a201c50 100644 --- a/ElectronicsShop/ElectronicsShopShopClientApp/Controllers/HomeController.cs +++ b/ElectronicsShop/ElectronicsShopShopClientApp/Controllers/HomeController.cs @@ -287,6 +287,10 @@ namespace ElectronicsShopUserApp.Controllers { return PaymeantOption.Неоплачено; } } - - } + [HttpPost] + public double Calc(int count, int product) { + var _product = APIClient.GetRequset($"api/main/getproduct?_productid={product}"); + return count * (_product?.Price ?? 1); + } + } }