User authentication failed due to invalid authentication values

Created on 10 August 2023, over 1 year ago
Updated 6 September 2023, about 1 year ago

Problem/Motivation

I can't get my sandbox transactions to go through - I always get "User authentication failed due to invalid authentication values" errors.

Steps to reproduce

  • Install Commerce (including Order etc) and Commerce Authorize.net
  • Follow steps on the Dashboard (examplesite.com/admin/commerce/config/licenses/dashboard) to set up checkout flows, order types, and so on.
  • Configure the Authorize.net Payment Method using Accept.js and Test Mode.

Results, for me: on the checkout page, trying to complete payment produces a "User authentication failed due to invalid authentication values" error.

More Info

I am trying to migrate / recreate a Drupal 7 Ubercart site to use Commerce.
The D7+UC site has an Authorize.net account that has been working fine with Drupal and UC for several years.
In Drupal 7+UC, Authorize.net has the following settings: AIM - Live , ARB - Production, and CIM - Production selected.

In D9+Commerce, I'm using the Accept.js plugin, with Mode set to Test. (I can't find any documentation on Accept.js vs. Visa Checkout, but Visa Checkout does not appear in my Digital Payments page on Authorize.net, so I assumed I should go with Accept.js.)

I first tried this using the sandbox credentials I'd used with the existing Authorize.net account, which I'd used successfully in the past with D7+Ubercart. I got "User authentication failed due to invalid authentication values" errors every time on the checkout page. I believe, for sandbox testing, the Drupal config is supposed to be set to Test (not Live) and the Authorize.net sandbox account is supposed to be set to Live (not Test), but no matter what combinations of Test and Live I tried, I always got the "User authentication failed due to invalid authentication values" errors.

I tried generating a new API sandbox key, but I still got the same error messages.

I then tried creating a brand new sandbox account at Authorize.net. I still got the same error messages.

There is one difference: with the old sandbox account (which should work, and has worked previously with Ubercart), I see these errors in the Drupal logs:

Received response with code Error from Authorize.net: E00007: User authentication failed due to invalid authentication values.

With the new sandbox account, even though I get the same "User authentication failed due to invalid authentication values" on the cart checkout page, I don't see those response code error entries in the Drupal log.

(Also: If I create an order using the built-in generic Credit Card payment method, the order goes through and my license gets granted, although I have to receive payment manually.)

I'd like to be able to get Authorize.net test transactions working so I can fully test my Commerce products and workflows. Can you help me figure out what to try next, or let me know if you see any errors in my set up so far?

Thank you!

💬 Support request
Status

Active

Version

1.8

Component

Code

Created by

🇺🇸United States kristi wachter

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @kristi wachter
  • 🇺🇸United States zim-

    I've been dealing with this myself and I believe I've found a solution. When I created an Authorize.net sandbox account I was given a key with the value "SIMON", I believed this is what I needed to enter for the "Client Key" field when setting up the Authorize.net payment gateway. I kept getting the "Received response with code Error from Authorize.net: E00007: User authentication failed due to invalid authentication values." message.

    When setting up the payment gateway using Authorize.net (Accept.js), you need to manually generate a public client key. Instructions for that can be found here: https://developer.authorize.net/api/reference/features/acceptjs.html#Gen... I followed the "Generating the Public Client Key using the Merchant Interface" instructions and after using the new key my payments finally went through.

    Hope that helps.

  • 🇺🇸United States kristi wachter

    zim - THAT WORKED! Thank you so much. Now that I've created a Public Client Key and used that on my Accept.js config page, my transactions are going through.

    Thank you SO MUCH for answering my question and sharing that! I hope this thread will be helpful to anyone else who runs into a similar problem.

  • 🇮🇳India Deepesh151086

    Hi Zim, that worked me too but on payment completion I am getting "We encountered an error processing your payment method. Please verify your details and try again." and in logs I am getting Received response with code Error from Authorize.net: E00003: The 'AnetApi/xml/v1/schema/AnetApiSchema.xsd:customerProfileId' element is invalid - The value '' is invalid according to its datatype 'AnetApi/xml/v1/schema/AnetApiSchema.xsd:numericString' - The Pattern constraint failed.

    Even though I am receving emails in my account with approved status.

  • 🇮🇳India Deepesh151086

    Problem resolved by changing test mode to live in account settings. I was using demo credit cards with live mode initially. Only real credit card numbers will with live mode in sandbox account. With test mode transaction will also take place but with 0 transaction id ,so will not be visible in 'transaction details'.

Production build 0.71.5 2024