1

Not sure if this was addressed before but when I was using Store 1.6 with Authorize.net if a person failed to put a last name they would get an error.

After upgrading to Store 2.x it was necessary to split the billing_name form field into separate First and Last name fields.

I don't recall if this was because the last name was simply no longer required somehow (so no error with just one word submitted) or it if was somehow slipping through, but it just made more sense to use First/Last names separately now that they're split in the Order itself.

At the time this was a pretty big problem for us as we really needed the customers' last names. Several people were able to purchase with providing only a first name. I am not sure if this problem exists for other gateways and the transition from 1.6.x to 2.x.

edit for clarity:

In Store 1.6.x w/ Authorize.net:

  • One billing name field, last name is required with only require="billing_name", user gets an error if submitting checkout form without a second name ( {error:payment_method} would read The Last Name field is required. which to me suggests it's from the gateway.)

In Store 2.x w/ Authorize.net:

  • One billing name field, order goes through with only one name despite being same form with require="billing_name...". Last name is no longer required.

We didn't change anything on our merchant account. What went wrong? Was Store 1.6.x's error really from Authorize.net? If so, why doesn't it appear in Store 2.x? If not, why did it disappear in Store 2.x without any notice in the docs?

3
  • Sorry, I'm confused. What's the question? Can you give an example of the issue? Jan 30, 2014 at 11:31
  • We had one field for Billing Name. Instead of getting both first and last name customers were able to purchase with just the first name. In Store 1.6.x they would get an error requiring the last name.
    – notacouch
    Jan 30, 2014 at 22:44
  • @AdrianMacneil Sorry about that, added some actual questions, was more just sharing my experience.
    – notacouch
    Feb 1, 2014 at 2:02

1 Answer 1

1

That's an interesting observation. It certainly wasn't an intentional change, but it seems like one for the better in your situation.

In Store 1.6, the check for a last name was coming from this line in CI-Merchant:

https://github.com/expressodev/ci-merchant/blob/master/libraries/merchant/merchant_authorize_net.php#L71

So the last name check was made by Store/CI-Merchant. This was probably due to the field being listed as required in the Authorize.net API documentation.

Store 2 uses Omnipay instead of CI-Merchant, so the payment gateways were rewritten from scratch. In the Omnipay Authorize.Net driver, there is only a check for a single name, not separate first name/last name (even though they are still separate fields in the gateway).

https://github.com/omnipay/authorizenet/blob/master/src/Omnipay/AuthorizeNet/Message/AIMAuthorizeRequest.php#L15

Since you have had orders go through successfully, it would appear that Authorize.Net does not have a problem creating payments with only a single name, and since the last name check was removed in Store 2/Omnipay, it's now working as expected.

2
  • That would explain why the error came from the payment method as opposed to the billing_name field. Just adding here again the solution was to split the fields into two. Out of curiosity do you know if it is possible to add billing_last_name to the required fields but only use a single billing_name input?
    – notacouch
    Feb 2, 2014 at 15:54
  • 1
    No, it's not possible, and it would be slightly weird UX anyway. Just use either a single billing_name, or separate first and last names if you require both. Feb 3, 2014 at 6:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.