public async Task <bool> ProcessOrder(OrderModel order) { double totalPrice = _priceCalculator.CalculateTotalPrice(order); int ccResponseId = await _ccClient.ChargeCreditCard(order.Orderer, totalPrice); try { _orderProcessorStore.ProcessOrderInStorage(order); } catch { await _ccClient.CancelCreditCardCharge(ccResponseId); throw; } await _notificationService.NotifyClientAboutOrder(order, totalPrice); return(true); }