We have an application that uses the Ruby authorize-net gem (version 1.5.2). After transactions we display the card type and last 4 digits of account_number. In testing against the sandbox this works fine. We just deployed to production, and what we are seeing:
response.card_type - contains the last 4 of the card number, e.g.' XXXX1234'
response.fields[:account_number] - empty
At first I thought this was just a formatting error on our part, but I dumped the AuthorizeNet::AIM::Response object, and that has
... :account_number=>"", :card_type=>"XXXX1234" ...
in the @fields hash. So either the values are being returned incorrectly or the Ruby library is parsing them incorrectly.
Is there a fix for this? Anyone else run into something similiar?
Thanks - Dave
Solved! Go to Solution.
10-09-2013 09:41 AM
That not because special characters, it the delimited char.
You might be able to change that in the SDK
10-09-2013 02:12 PM
Additional information: we are using AIM for integration. The transaction is accepted and we get a successful response.
10-09-2013 09:57 AM
More info: I looked more closely at the response. The error is apparently due to the original street address including a comma. It was something like
111 Jones St, PO Box 12345
On the parsing of the response, apparently this thru the authorize_net ruby code off, because I can see that everything got shifted over: the street became "111 Jones St", the city is "PO Box 12345", etc.
So it looks like there's a bug at least commas in the input can cause problems in parsing the reply. Is there a list of special characters that we should be filtering when submitting transactions?
10-09-2013 11:59 AM
That not because special characters, it the delimited char.
You might be able to change that in the SDK
10-09-2013 02:12 PM
Thanks, that is the problem. The Ruby gem defaults the delimiter to be comma, which is not the best choice. It's an option when creating the transaction so it's easy to modify.
10-10-2013 06:32 AM