cancel
Showing results for 
Search instead for 
Did you mean: 

Who Me Too'd this topic

C# API add LineItems to transasctionRequest

I am trying to pass lineItems to the transactionRequest, but I am not doing something right.  I added a snapshot of the portion of code and was hoping someone can point me in the right direction. 

 

Thanks in advance.

 

 

//standard api call to retrieve response
            var paymentType = new paymentType { Item = creditCard };

            var orderDetails = new orderType { invoiceNumber = "Inv 01234", description = "Test" };

            var items = new lineItemType { itemId = "TESTER", description = "Dec", name="Name", quantity = 1, taxable = false, taxableSpecified = false, unitPrice = 0.10m };
           

            var transactionRequest = new transactionRequestType
            {
                transactionType = transactionTypeEnum.authCaptureTransaction.ToString(),    // charge the card
                //amount = 133.45m,
                amount = Amount,
                payment = paymentType,
                order = orderDetails,
                lineItems = items
            };
c2w
Member
Who Me Too'd this topic