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.
|
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!
Solved! Go to Solution.
02-12-2015 06:05 AM - edited 02-12-2015 06:17 AM
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
04-19-2015 02:07 PM