Esempio n. 1
0
        public async Task <bool> SavePaymentDetailsAsync(PaymentRequest request, PaymentResponse response)
        {
            var transaction = MongoModelConverter.To(request, response);

            if (transaction == null)
            {
                return(false);
            }

            this.logger?.LogInformation(
                "Trying to save payment with id: {identifier}.",
                response.Identifier);

            await this.context.Transactions.InsertOneAsync(transaction);

            return(true);
        }