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

Gerald V. Livingston II gerald.freeside at sysmatrix.net
Mon Oct 16 15:15:52 PDT 2006


New info at bottom...

On Sat, 14 Oct 2006 14:54:35 -0500 (Central Standard Time) "Gerald V.
Livingston II" <gerald.freeside at sysmatrix.net> wrote:

> 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

It looks like the following may need to be changed to get it working but
I'm getting VERY lost digging through it.

/var/www/freeside/misc/payment.cgi
/var/www/freeside/misc/process/payment.cgi

And I'm sure I'm missing some --- like whichever .cgi forces the exact name
on card entry to be required

For now I've removed "last_name first_name" from the list or required
fields in
/usr/local/share/perl/5.8.4/Business/OnlinePayment/AuthorizeNet.pm and the
charges are processed normally. 

It appears that the Business::OnlinePayment::AuthorizeNet maintainer (is
that you now Ivan?) has jumped the gun just a little bit and started
forcing a requirement that ONLY has to be set for "AIM Wells Fargo
SecureSource Merchants". x_first_name and x_last_name are NOT required
fields for "regular" Authorize.Net AIM merchants according to the AIM guide
(http://www.authorize.net/support/AIM_guide.pdf --- search for
"x_first_name").

It *does*, however, make the submission a "little gofy looking" when
submitting the name as a single field. The is no single "payname" field
that I can find in the AIM guide and what Authorize.Net does is grab what
is submitted and "split" it at the last "space" character. When I process a
payment on my card my name shows up in the unsettled transactions screen as
"II, Gerald V Livingston" so Freeside does need to be corrected to submit
separate first/last.

If anyone could help I would rather replace only those files that need to
be corrected in my 1.5.8 setup rather than having to a full upgrade later.

Also, can someone explain the use of the "additional lines" in the CC
Processor configuration setup? Here's the text from the config edit screen:

 business-onlinepayment - Business::OnlinePayment support, at least three
lines: processor, login, and password. An optional fourth line specifies
the action or actions (multiple actions are separated with `,': for
example: `Authorization Only, Post Authorization'). Optional additional
lines are passed to Business::OnlinePayment as %processor_options

I woud like to be able to set "x_Test_Request=>TRUE" while I'm farking
aroung with the system so that any transactions submitted go in as test
transactions. Right now I just use my own card and void any successful
transactions. I'd rather not set up a full blown test account with Auth.Net
because I'm not a full time developer. Being able to set x_Test_Request has
worked well for our php order pages that I maintain.

Gerald


More information about the freeside-users mailing list