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
1 ACCEPTED SOLUTION

Accepted Solutions

Hi Vaslin,

 

Apologies if the mention of the new model was a distraction we have updated the existing code in our future branch.  We do not have a release built with this change yet but you can build the dll from this code base.   https://github.com/AuthorizeNet/sdk-dotnet/tree/future

 

The new SDK model is still suplementary to our existing code, the reason I suggested that was that you could have an immediate solution.

 

Another reason for using the new model would be to take advantage of createTransaction API method rather than createCustomerProfileTransactionRequest.  At an API level CreateTransaction is the recommended way to charge profiles (consistent request & comprehensive response) going forward and we will be updating the SDK in the future to use that method (regardless of old model/new model).

 

Hope this helps,

 

Brian 

View solution in original post

10 REPLIES 10
RaynorC1emen7
Expert

Hello

I would recommend submitting an issue in GitHub to alert the development team.  You can even submit your fix for our review and inclusion: https://help.github.com/articles/using-pull-requests

Richard

We're looking into this issue but luckily there is an alternative now to using createCustomerProfileTransactionRequest and we hope it's actually a better alternative.

 

We've recently updated our standard createTransaction method to accept profiles and we would actually like to deprecate createCustomerProfileTransaction so that developers have one method for doing payments regardless of the payment data (e.g. cards, payment profiles, bank accounts, apple pay, etc).  

 

Here's the full code sample: https://github.com/AuthorizeNet/sdk-dotnet/blob/master/AuthorizeNETtest/Api/Controllers/SampleTest/C...

 

 

Any update on this?  We ran into the same problem.  I don't think we have the time to re-write the code to use the new features you are suggesting.  Any idea of a fix?

I hadn't seen the response from brianmc, I didn't get an email alert that you responded.

 

I guess I don't understand what you are saying exactly brianmc, are you still supporting the sdk-dotnet GitHub component, or are you telling me to abandon it and go with the completely different coding in the samples?

Hi Vaslin,

 

Apologies if the mention of the new model was a distraction we have updated the existing code in our future branch.  We do not have a release built with this change yet but you can build the dll from this code base.   https://github.com/AuthorizeNet/sdk-dotnet/tree/future

 

The new SDK model is still suplementary to our existing code, the reason I suggested that was that you could have an immediate solution.

 

Another reason for using the new model would be to take advantage of createTransaction API method rather than createCustomerProfileTransactionRequest.  At an API level CreateTransaction is the recommended way to charge profiles (consistent request & comprehensive response) going forward and we will be updating the SDK in the future to use that method (regardless of old model/new model).

 

Hope this helps,

 

Brian 

Thanks Brian! 

 

I had just finished a complete website rewrite from a different company and I had to show a fully functional billing by end of month.  So glad you were able to fix my issues before I sent over 2000+ billing charges next week!

For planning purposes, when do you believe that you will release the update?

 

Or should I download the code and compile it and include the DLL directly?

I went ahead and removed the NuGet references, downloaded the 'future' branch, compiled it, and added it as a reference in my app.

 

Everything is now working perfectly and I am finally getting valid data back from the AuthorizeAndCapture method.

 

Thank you!