Get Credit Card Auth Information out of an Order object

For general questions and discussions specific to the AbleCommerce GOLD ASP.Net shopping cart software.
Post Reply
FirstDivision
Ensign (ENS)
Ensign (ENS)
Posts: 12
Joined: Thu Jan 31, 2013 4:53 pm

Get Credit Card Auth Information out of an Order object

Post by FirstDivision » Fri Mar 08, 2013 4:00 pm

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
Last edited by FirstDivision on Fri Mar 08, 2013 5:07 pm, edited 1 time in total.

User avatar
david-ebt
Captain (CAPT)
Captain (CAPT)
Posts: 253
Joined: Fri Dec 31, 2010 10:12 am

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

Post by david-ebt » Fri Mar 08, 2013 4:20 pm

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.
David
http://www.ecombuildertoday.com
Enhanced Reporting for AbleCommerce
Image

Post Reply