Authorize.net - Show & Email last 4 digits of credit card - Updated

Started by sleepigrl, November 12, 2012, 18:25:11 PM

Previous topic - Next topic

sleepigrl

I need to be able to view/show the last four digits of the credit card number used with authorize.net processing (AIM).  In VM admin, orders show XXXX in the "Account number" field. 

I can see that the last 4 digits are being returned by authorize.net, but they aren't stored correctly in the database field authorizenet_response_account_number.  Looks like the issue is that 8 characters are being returned (XXXX1234) and only the first four are saved as the field is of type char(4).  How can I rectify this?  XXXX is useless information :)  See the attached screenshots for what's shown in admin, stored in the database & what's actually returned by auth.net.

Updated - ***Changing the database field to char(8) fixes this issue, so this is a bug in the Virtuemart authorize.net plugin (not accounting correctly for auth.net return data). 

In addition, is there a way to include this information along with the credit card type (e.g. Visa, Mastercard, etc) on the emails to both the shopper & the vendor? 


This site uses:
VM 2.0.12f
Joomla 2.5.7



[attachment cleanup by admin]

ironlion37

Thanks! Really helpful. The issue I'm having is that I'm not getting the XXXX1234 in my info returned from auth.net...

Probably should blur out that person's personal info  :o

sleepigrl

Oops!  Thanks for the heads-up - fortunately, that was MY information and not a client's. 

Are you certain you're not getting the XXXX1234 returned from auth.net?  I used firefox w/httpfox to watch what was being sent/received.  That's how I determined that the ccard wasn't being stored although it was being received.