e-commerceauthorize.netauthorize.net-aim

Complex Names with Authorize.net AIM


How do the rest of you handle complex names when submitting a transaction to Authorize.net using AIM?

Nearly every ecommerce application on the planet asks the user to fill in the "Name as it appears on your credit card". For some odd reason, Authorize.net wants you to submit x_First_Name and x_Last_Name however.

This is fine when you're dealing with Mary Jones or Jack Smith. It becomes a real hassle when you've got Margret A. Jones-Robinson and H. William Robert Van Horn, Sr. though.

Is there a best practice here?

First & Middle names in the x_First_Name field?

Last Name, Hyphenated Name and/or Suffix in the x_Last_Name field?

Has anyone developed a routine to parse names accordingly?

Thanks!


Solution

  • Have two fields on your payment form. One for their first name and one for their last name. However the customer chooses to complete the form is how you should submit it (and save it in your database if you choose to do so). FYI, the name on the credit card is not used in the processing of the credit card so you do not have to transmit it to Authorize.Net to process the transaction. You should do it anyway as it helps to keep your records accurate and complete which is handy when doing audits of your transaction history.

    You should generally try to avoid using one field for names as it opens up the possibility for people to enter bad information like, "The Smith Family" or "Barabara and Steve". By having two clearly delimited fields you greatly reduce the occurrence of this.