Reply
Highlighted
Member
Posts: 3
Registered: ‎02-03-2015
Accepted Solution

Response object missing TransactionID

[ Edited ]

Hello all,

I'm adding Authorize.NET to an existing point-of-sale system of cash registers on WIndows platform. Transactions will be card present entered with usb card swipe by cashiers. I built the Authorize.NET C# library project and have sucessfully captured a transaction on a live account. The problem is the response object does not appear to be getting the "TransactionID" property populated. That and the "Approved" property is so far always false, but I can go by "ResponseCode" instead.

Here is the raw POST that gets sent (from CardPresentAuthorizeAndCaptureRequest.ToPostString(), tracks removed):

x_delim_data=TRUE&x_delim_char=%7c&x_relay_response=FALSE&x_method=CC&x_version=3.1&x_track1=XXXXX&x_track2=XXXXX&x_amount=0.25&x_type=AUTH_CAPTURE&x_market_type=2&x_device_type=4

And here is a text save of the IGatewayResponse properties:
Approved: False
AuthorizationCode: [hidden]
Message: This transaction has been approved.
ResponseCode: 1.0
TransactionID:

 

Edit: The transaction does show in the merchant account with a transaction ID.


Am I missing anything?

Thank you much for your help!
Randy Stone


Accepted Solutions
Highlighted
Solution
Accepted by topic author randystone
‎08-21-2015 01:58 AM
Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: Response object missing TransactionID

[ Edited ]

There are 2 response object, one for CP transaction (CardPresentResponse) and the other for CNP transaction (GatewayResponse). look to me it is using the CNP response.

 

From https://github.com/AuthorizeNet/sdk-dotnet/blob/master/AuthorizeNETtest/CardPresentGatewayTest.cs

here a sample response from CP transaction. Note the 1.0 extra field at the beginning.

string responseString = "1.0|1|1|This transaction has been approved.||P||2207702802|9FE994E47A8F0F44552C5CA59D09BE79||||||||||||XXXX1111|Visa";

View solution in original post


All Replies
Highlighted
Solution
Accepted by topic author randystone
‎08-21-2015 01:58 AM
Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: Response object missing TransactionID

[ Edited ]

There are 2 response object, one for CP transaction (CardPresentResponse) and the other for CNP transaction (GatewayResponse). look to me it is using the CNP response.

 

From https://github.com/AuthorizeNet/sdk-dotnet/blob/master/AuthorizeNETtest/CardPresentGatewayTest.cs

here a sample response from CP transaction. Note the 1.0 extra field at the beginning.

string responseString = "1.0|1|1|This transaction has been approved.||P||2207702802|9FE994E47A8F0F44552C5CA59D09BE79||||||||||||XXXX1111|Visa";
Highlighted
Member
Posts: 3
Registered: ‎02-03-2015

Re: Response object missing TransactionID

Thanks for the fast response RaynorC1emen7.

I found something else strange that made me think there is a parsing issue. I found the Transaction ID. It is getting populated to the InvoiceNumber property of IGatewayResponse. Could this parsing to the wrong property happen from using the wrong response object?

I'll look up the other object and give your solution a try.
Thanks!

Highlighted
Member
Posts: 3
Registered: ‎02-03-2015

Re: Response object missing TransactionID

It wasn't the response object that was wrong, it was my Gateway object - I was creating a Gateway object, not a CardPresentGateway object.

Both "Approved" and "TransactionID" are populating correctly.

 

Thank you very much RaynorC1emen7!