cancel
Showing results for 
Search instead for 
Did you mean: 

CIM AuthorizeAndCapture - Approved flag set to false

I'm using the SDK from GITHUB for my ASP.NET MVC5 application in Test mode

 

I created an order

 

            var order = new Order(customer.ProfileID, paymentProfile.ProfileID, null);

foreach (var applicant in invoice.Applicants) {
order.AddLineItem(applicant.ApplicantId.ToString(), applicant.FullName, applicant.CityStatePostalCode, 1, UnitPrice, false);
}

order.Description = "SWFT Fingerprint Transactions"; order.InvoiceNumber = invoice.InvoiceId.ToString(); order.PONumber = client.Billing.PurchaseOrder; order.SalesTaxAmount = invoice.SalesTax; order.Amount = invoice.TotalAmount; try { var response = gateway.AuthorizeAndCapture(order); if (!response.Approved){ throw new AuthorizeNetException("The transaction was not approved."); }

 And received an email that absolutely everything went thru ok.

 

Total: US $180.00

Visa
Date/Time:12-Feb-2015 6:00:23 PST
Transaction ID:2228425395
 

 

The problem is the response that I get back from AuthorizeAndCapture.

 

response.ResponseCode = "OkI00001Successful."

response.Approved = false

response.CAVResponse = "Blank or not present = CAVV not validated"

 

So the transaction failed, but the email says that it was approved.

There is some sort of disconnect here.  Can you help me fix it?

 

Thanks!

Vaslin
Member
10 REPLIES 10

Same issue here, I'm considering compiling the future branch. Is there any issue with instead simply checking if the response code contains Successful? IE, I perform certain code depending on if the transaction went through, and if the response code is Okl00001Successful then can I assume this is the same as the future branch flagging approved?

 

My code condition would look like this:

cimResponse.ResponseCode.Contains( "Successful" ) == true