Exemple #1
0
        public async Task <ExecutePaymentRequestResponseModel> ExecutePaymentRequestAsync(
            ExecutePaymentRequestRequestModel model)
        {
            var request = _mapper.Map <Lykke.Service.PartnersIntegration.Client.Models.PaymentsExecuteRequestModel>(model);

            var result = await _partnersIntegrationClient.PaymentsApi.ExecutePaymentRequestAsync(request);

            return(_mapper.Map <ExecutePaymentRequestResponseModel>(result));
        }
        public async Task <ExecutePaymentRequestResponseModel> ExecutePaymentRequestAsync(
            [FromBody] ExecutePaymentRequestRequestModel model)
        {
            model.SetPartnerId(_requestContext.UserId);

            var sanitizedModel = new
            {
                model.PaymentRequestId,
                PartnerId = model.GetPartnerId()
            };

            _log.Info("Execute payment request started", sanitizedModel);

            var result = await _paymentService.ExecutePaymentRequestAsync(model);

            _log.Info("Execute payment request finished", sanitizedModel);

            return(result);
        }