Example #1
0
        /// <inheritdoc/>
        public async Task <OnlinePaymentResultDto> CreateOnlinePaymentAsync(
            CreateOnlinePaymentDto model)
        {
            await _paymentValidator.ValidateCreateOnlinePaymentAsync(model);

            var payment = await _paymentFactory.BuildOnlinePaymentAsync(model);

            await _paymentRepository.AddAndSaveAsync(payment);

            return(await Task.FromResult(
                       payment.Adapt <OnlinePaymentResultDto>()
                       ));
        }