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
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/fu
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
03-23-2015 03:35 PM
sound like the same issue he/she is having
02-12-2015 06:32 AM
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
02-12-2015 07:17 AM
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...
02-20-2015 10:55 PM
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?
03-11-2015 02:44 PM
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?
03-23-2015 01:06 PM
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/fu
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
03-23-2015 03:35 PM
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!
03-23-2015 05:27 PM
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?
03-24-2015 06:29 AM
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!
03-24-2015 06:45 AM