cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with AUTH_ONLY transaction while testing

I'm trying to write code to explore the late payment transaction. In the code I have NameValueCollection object with the x_type set to AUTH_ONLY but when I create object of AuthorizationRequest with the collection, somehow it is automatically set type to AUTH_CAPTURE. I want to know how do I implement AUTH_ONLY transactions?

 

-

Dipesh

dipesh
Member
1 ACCEPTED SOLUTION

Accepted Solutions

Just checked the code of Authorize.Net project from SDK and figured out that, even if you pass all values through NameValueCollection Parameter, it sets only three parameters, 1. CreditCardNumber, 2. CreditCardExpiration and 3. Amount. Even TransactionType (ApiAction) is not handled correctly in SDK. 

 

Well, I am extending it further to resolve the loopholes so let me know if anyone needs updated SDK.

 

View solution in original post

dipesh
Member
2 REPLIES 2

My Code is as Follow:

 

NameValueCollection nvcParam = new NameValueCollection();
nvcParam.Add(ApiFields.Type, "AUTH_ONLY");
nvcParam.Add(ApiFields.CreditCardNumber, "4111111111111111");
nvcParam.Add(ApiFields.CreditCardExpiration, "1216");
nvcParam.Add(ApiFields.CreditCardCode, "Test Transaction");
nvcParam.Add(ApiFields.Amount, "1.99");
nvcParam.Add(ApiFields.Description, "Test Transaction");
nvcParam.Add(ApiFields.PONumber, "S1");

 

AuthorizationRequest request = new AuthorizationRequest(nvcParam);

 

var gate = new Gateway(_apiLogin, _apiTransactionKey, true);

var response = gate.Send(request);

Console.WriteLine("{0}: {1}", response.ResponseCode, response.Message);
Console.WriteLine("Auth Code: {0}", response.AuthorizationCode);

 

dipesh
Member

Just checked the code of Authorize.Net project from SDK and figured out that, even if you pass all values through NameValueCollection Parameter, it sets only three parameters, 1. CreditCardNumber, 2. CreditCardExpiration and 3. Amount. Even TransactionType (ApiAction) is not handled correctly in SDK. 

 

Well, I am extending it further to resolve the loopholes so let me know if anyone needs updated SDK.

 

dipesh
Member