public async Task <PaymentResult> CreateCardPayment(CardPayment cardPayment)
        {
            var result = new PaymentResult();

            try
            {
                await _paymentsRepository.CreatePaymentRequest(cardPayment);

                result = await _foobarBankClient.CreatePayment(cardPayment);

                return(result);
            }
            catch (Exception ex)
            {
                _logger.LogError(ex, $"Exception occurred creating card payment Reference={cardPayment.Reference}");
                result = new PaymentResult()
                {
                    PaymentStatus = PaymentStatus.Error,
                    Reference     = cardPayment.Reference
                };
                return(result);
            }
            finally
            {
                await _paymentsRepository.UpdatePaymentResult(result);
            }
        }