[freeside-users] payment.cgi and Business::OnlinePayment::AuthorizeNet errors

Gerald V. Livingston II gerald.freeside at sysmatrix.net
Sat Oct 14 12:54:35 PDT 2006


Debian 3.1r2
perl v5.8.4 built for i386-linux-thread-multi
(PostgreSQL) 7.4.7
Freeside 1.5.8 grabed from cvs on 8/17/2006
HTML::Mason

When I submit a CC payment freeside dies with the following error:

missing required field last_name at
/usr/local/share/perl/5.8.4/FS/cust_main.pm line 2438

Except Last Name is not missing.

payment.cgi appears to be submitting to
Business::OnlinePayment::Authorizenet with a single "payname" field
containing either the concatenated "First Name + Last Name" fields from the
database OR the complete "Name As It Appears On Card" field if it is
populated. 

Business::OnlinePayment::Authorizenet states in its documentation that it
requires separate "first_name" and "last_name" fields. I didn't see a place
where it would take a full "Name as it appears on card" field.

>From the docs: 

Unlike Business::OnlinePayment or pre-3.0 verisons of
Business::OnlinePayment::AuthorizeNet, 3.1 requires  separate first_name
and last_name fields.

Now, the "cute" part.

Even though Freeside dies with an error the transaction *IS* submitted, and
is actually approved if all of the other info is correct. It just never
gets applied to the account in Freeside because it dies with an error
before posting the credit to the account.

I need it to either *NOT* die if it gets a single "payname" field *OR*
(more correctly) have payment.cgi actually submit seperate first/last
fields if the CC processor is set to Authorize.Net. "Exact Name On Card" is
a required field on the customer edit screen and it will have to be broken
into last/first parts for proper submission or just force getting the info
from the "billing info" section and add a warning note that the name should
match what is on the card exactly. (Parsing the "Exact Name On Card" field
some way would not be easy -- see my example. Name on account is just
Livingston, Gerald but full name as it appears on card is Gerald V
Livingston II)

I don't have a clue how to fix it. Not a programmer. *MAY* be able to
muddle my way through a fix but it will be *UGLY*. Any help appreciated.

The error output and the "Process card payment" page that caused the error
are at http://phorce1.us/freeside/CCTest/

I "cleaned" sensitive data on those screens -- if anyone spots something I
missed please let me know off-list.

Gerald



More information about the freeside-users mailing list