cancel
Showing results for 
Search instead for 
Did you mean: 

E_WC_21: User authentication failed due to invalid authentication values

Hi

 

i know you probably get this question all the time.

 

I've checked through previous posts and have regenerated both client key and transaction key.  I'm using the AcceptsJS so the transaction key is irrelevant anyway.

 

This has been working fine in sandbox and I've just pushed it into live, changed the settings to PRODUCTION and the authentication values are picked up from the database.

 

now I get the error: E_WC_21: User authentication failed due to invalid authentication values

 

Stepping through the code, it is when trying to get the TOKEN.  My code is pretty much a copy of the supplied code except wrapped into a container class as I may have more than AcceptJS call in the window - as follows:-

 

var ANAJSManagerGY1Z = new function() {


... code to setup the cardData here

secureData.cardData = cardData;

// The Authorize.Net Client Key is used in place of the traditional Transaction Key. The Transaction Key
// is a shared secret and must never be exposed. The Client Key is a public key suitable for use where
// someone outside the merchant might see it.
authData.clientKey = "******************";
authData.apiLoginID = "*******";
// debugger;
secureData.authData = authData;

// Pass the card number and expiration date to Accept.js for submission to Authorize.Net.
Accept.dispatchData(secureData, ANAJSManagerGY1Z.responseHandler);
}
}
// Process the response from Authorize.Net to retrieve the two elements of the payment nonce.
// If the data looks correct, record the OpaqueData to the console and call the transaction processing function.
this.responseHandler = function(response) {
var message = '';

... handler code

}

Any ideas?

Thanks

sudwebdesign77
Contributor
1 ACCEPTED SOLUTION

Accepted Solutions

It's always the obvious.

 

I had changed from SANDBOX to PRODUCTION in backend code but not in the javascript:

if ( MY_ENV=='dev' )
{
    //<!-- For Sandbox/Testing, use: -->
    <script type="text/javascript" src="https://jstest.authorize.net/v1/Accept.js" charset="utf-8"></script>"
} else {   
    //<!-- For Production, use: -->
    <script type="text/javascript" src="https://js.authorize.net/v1/Accept.js" charset="utf-8"></script>    
}

View solution in original post

sudwebdesign77
Contributor
1 REPLY 1

It's always the obvious.

 

I had changed from SANDBOX to PRODUCTION in backend code but not in the javascript&colon;

if ( MY_ENV=='dev' )
{
    //<!-- For Sandbox/Testing, use: -->
    <script type="text/javascript" src="https://jstest.authorize.net/v1/Accept.js" charset="utf-8"></script>"
} else {   
    //<!-- For Production, use: -->
    <script type="text/javascript" src="https://js.authorize.net/v1/Accept.js" charset="utf-8"></script>    
}
sudwebdesign77
Contributor