Beispiel #1
0
        public void Cancel(CancelPaymentInputDto inputDto)
        {
            var order = _orderRepository.Get(inputDto.Id);

            Validate.Found(order, "Orderan");
            order.Cancel();
            _orderRepository.Update(order);

            var tenant  = GetCurrentTenant();
            var message = NotificationMessageHelper.GenerateCancelOrderMessage(order, inputDto.Reason, tenant);

            WhatsappAPI.SendMessage(order.Customer.WhatsappNumber, message);
        }
Beispiel #2
0
 public IActionResult Cancel(CancelPaymentInputDto inputDto)
 {
     _orderAppService.Cancel(inputDto);
     return(Ok());
 }