Reply
Member
Posts: 9
Registered: ‎01-27-2015
Accepted Solution

CIM AuthorizeAndCapture - Approved flag set to false

[ Edited ]

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!


Accepted Solutions
Solution
Accepted by topic author Vaslin
‎08-21-2015 01:58 AM
Administrator
Posts: 149
Registered: ‎03-28-2014

Re: CIM AuthorizeAndCapture - Approved flag set to false

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


All Replies
Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: CIM AuthorizeAndCapture - Approved flag set to false

Posts: 2,765
Topics: 57
Kudos: 270
Blog Posts: 67
Registered: ‎12-05-2011

Re: CIM AuthorizeAndCapture - Approved flag set to false

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

Administrator
Posts: 149
Registered: ‎03-28-2014

Re: CIM AuthorizeAndCapture - Approved flag set to false

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...

 

 

Member
Posts: 1
Registered: ‎03-11-2015

Re: CIM AuthorizeAndCapture - Approved flag set to false

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?

Member
Posts: 9
Registered: ‎01-27-2015

Re: CIM AuthorizeAndCapture - Approved flag set to false

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?

Solution
Accepted by topic author Vaslin
‎08-21-2015 01:58 AM
Administrator
Posts: 149
Registered: ‎03-28-2014

Re: CIM AuthorizeAndCapture - Approved flag set to false

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 

Member
Posts: 9
Registered: ‎01-27-2015

Re: CIM AuthorizeAndCapture - Approved flag set to false

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!

Member
Posts: 9
Registered: ‎01-27-2015

Re: CIM AuthorizeAndCapture - Approved flag set to false

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?

Member
Posts: 9
Registered: ‎01-27-2015

Re: CIM AuthorizeAndCapture - Approved flag set to false

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!