Page 1 of 1

Get Credit Card Auth Information out of an Order object

Posted: Fri Mar 08, 2013 4:00 pm
by FirstDivision
I'm writing a routine to build xml files of each order as they come through the PaymentWidget. I am building the order in the following event when e.CheckoutResponse.Success is true:

Code: Select all

private void HandleCheckoutResponse(object sender, CheckedOutEventArgs e)
There is one block of XML I'm having trouble finding how to re-create. It looks like this:

Code: Select all

  <CardEvents>
   <CardAuth auth-response="A" cvv-response="S" amount="130.00" avs-response="YYY" approval-number="11111R"/>
  </CardEvents>
Is this something I can access from the Order object in

Code: Select all

e.CheckoutResponse.Order

Re: Get Credit Card Auth Information out of an Order object

Posted: Fri Mar 08, 2013 4:20 pm
by david-ebt
In 7.0.7, the CheckoutResponse only has the OrderId and OrderNumber. You'll need to use OrderDataSource to get the actual order. The reference information you're looking for is in the payment records associated with the order. If you're using 7.0.7, here's a snippet of code that pulls the transaction reference number from the first payment for an order:

Code: Select all

Order thisOrder = OrderDataSource.Load(e.CheckoutResponse.OrderId);
string Ref = thisOrder.Payments[0].ReferenceNumber;
Hopefully that will get you on the right trail.