Ejemplo n.º 1
0
        private void AddOrderLineItems(Cart cart, PaymentInformation payment, InitializeResult initializeResult)
        {
            Log.InfoFormat("Calling AddOrderLineItems for cart with ID:{0}. PaymentInformation:{1}. InitializeResult:{2}", cart.Id, payment, initializeResult);

            List <OrderLine> orderlines = CartHelper.OrderLines(cart, payment, initializeResult);

            foreach (OrderLine orderline in orderlines)
            {
                string hash   = _hasher.Create(_payExSettings.AccountNumber, orderline, _payExSettings.EncryptionKey);
                string result = _orderFacade.AddOrderLine(_payExSettings.AccountNumber, orderline, hash);

                Log.InfoFormat("Added OrderLineItem for cart with ID:{0}. OrderLine:{1}. Result:{2}",
                               cart.Id, orderline, result);
            }
        }