cancel
Showing results for 
Search instead for 
Did you mean: 

InvoiceNumber not saved with AuthCapture CIM

I am using the CIM api and passing an invoice number to Authorize.net.  I have two seperate types of transactions, Authorize only, Capture later... and Authorize/Capture.  The code below is pulled directly from the payment module written.  Both types of transactions successfully process.  The code has been stepped through and verified that there is a valid value being passed to invoiceID in the Auth/Capture now scenario, but it does not show up in the invoice column in Auth.net where the Authorize Only does....any clues?  Thanks.

 

This works: (Authorize Only)

        Order oOrder = new Order(ProfileID, ADN_PaymentProfileID, ADN_AddressID);
        oOrder.InvoiceNumber = invoiceID;
        oOrder.AddLineItem("1", "Application Fee", "", 1, ApplicationFee, false);

        // This one will be Authorize now, capture later
        AuthorizeNet.IGatewayResponse orderRespone = cg.Authorize(oOrder);

 

This Does Not: (Authorize/Capture now)

        Order oOrder = new Order(ProfileID, ADN_PaymentProfileID, ADN_AddressID);
        oOrder.InvoiceNumber = invoiceID;
        oOrder.AddLineItem("1", "Application Fee", "", 1, ApplicationFee, false);
        oOrder.AddLineItem("2", "Referal Fee", "", 1, ReferalFee, false);

        AuthorizeNet.IGatewayResponse orderRespone = cg.AuthorizeAndCapture(oOrder);

troyviney
Member
3 REPLIES 3

bug in the dll. in the CustomerGateway.cs

RaynorC1emen7
Expert

After line 237 in CustomerGateway.cs add:

 

trans.order = new orderExType();
trans.order.description = order.Description;
trans.order.invoiceNumber = order.InvoiceNumber;
trans.order.purchaseOrderNumber = order.PONumber;

 

I just looked at the Authorize(Order order) method (which was working) and noticed it wasn't getting set.  Once I added it and recompiled, it worked fine.

I am having the same problem, where can I find the CustomerGateway.cs?