<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: User authentication failed due to invalid authentication values. in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Re-User-authentication-failed-due-to-invalid-authentication/m-p/57471#M32190</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.developer.cybersource.com/t5/user/viewprofilepage/user-id/21468"&gt;@biru&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You would get this error if you are using invalid credentials or are using credentials with the wrong enviromentment. &amp;nbsp;For example, sandbox credentials will only work if the environment is set to sandbox, it will not work in production. &amp;nbsp;The same is true for production credentials not working in the sandbox.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use &lt;A href="http://developer.authorize.net/api/reference" target="_self"&gt;authenticateTestRequest&lt;/A&gt; to confirm if the credentials are valid. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Richard&lt;/P&gt;</description>
    <pubDate>Wed, 29 Mar 2017 23:03:15 GMT</pubDate>
    <dc:creator>RichardH</dc:creator>
    <dc:date>2017-03-29T23:03:15Z</dc:date>
    <item>
      <title>Re: User authentication failed due to invalid authentication values.</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Re-User-authentication-failed-due-to-invalid-authentication/m-p/57467#M32187</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" color="#000000"&gt;Dear Sir,&lt;/FONT&gt;&lt;/P&gt;&lt;DIV&gt;&lt;FONT face="Courier New" color="#000000"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New"&gt;I'm a &amp;nbsp;asp.net mvc developer&amp;nbsp; and i'm deploying Authorize.net to client website. When I'm going to transaction it shows the error "&lt;/FONT&gt;&lt;SPAN&gt;Response Text: User authentication failed due to invalid authentication values.&lt;/SPAN&gt;&lt;SPAN&gt;" What is this issue. I used my test account credentials so it's working fine but when i change the test credential to merchant API login and transaction key it shows the error. &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;my code&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;string res = "";&lt;BR /&gt;try&lt;BR /&gt;{&lt;BR /&gt;String ApiLoginID = "";&lt;BR /&gt;String ApiTransactionKey = "";&lt;BR /&gt;&lt;BR /&gt;ApiOperationBase&amp;lt;ANetApiRequest, ANetApiResponse&amp;gt;.RunEnvironment = AuthorizeNet.Environment.PRODUCTION/SENDBOX(both are using in individual);&lt;BR /&gt;&lt;BR /&gt;// define the merchant information (authentication / transaction id)&lt;BR /&gt;ApiOperationBase&amp;lt;ANetApiRequest, ANetApiResponse&amp;gt;.MerchantAuthentication = new merchantAuthenticationType()&lt;BR /&gt;{&lt;BR /&gt;name = ApiLoginID,&lt;BR /&gt;ItemElementName = ItemChoiceType.transactionKey,&lt;BR /&gt;Item = ApiTransactionKey,&lt;BR /&gt;};&lt;BR /&gt;&lt;BR /&gt;var creditCard = new creditCardType&lt;BR /&gt;{&lt;BR /&gt;cardNumber = objPay.Card_Num,&lt;BR /&gt;expirationDate = objPay.Day + (objPay.Year.Substring(objPay.Year.Length - 2)), //objPay.Exp_Date&lt;BR /&gt;cardCode = objPay.card_code&lt;BR /&gt;};&lt;BR /&gt;&lt;BR /&gt;var billingAddress = new customerAddressType&lt;BR /&gt;{&lt;BR /&gt;firstName = objPay.First_Name,&lt;BR /&gt;lastName = objPay.Last_Name,&lt;BR /&gt;address = objPay.Address,&lt;BR /&gt;city = objPay.City,&lt;BR /&gt;zip = objPay.ZIP&lt;BR /&gt;};&lt;BR /&gt;//standard api call to retrieve response&lt;BR /&gt;var paymentType = new paymentType { Item = creditCard };&lt;BR /&gt;&lt;BR /&gt;var transactionRequest = new transactionRequestType&lt;BR /&gt;{&lt;BR /&gt;transactionType = transactionTypeEnum.authOnlyTransaction.ToString(), // authorize only&lt;BR /&gt;amount = objPay.Amount,&lt;BR /&gt;payment = paymentType,&lt;BR /&gt;billTo = billingAddress&lt;BR /&gt;};&lt;BR /&gt;&lt;BR /&gt;var request = new createTransactionRequest { transactionRequest = transactionRequest };&lt;BR /&gt;&lt;BR /&gt;// instantiate the contoller that will call the service&lt;BR /&gt;var controller = new createTransactionController(request);&lt;BR /&gt;controller.Execute();&lt;BR /&gt;&lt;BR /&gt;// get the response from the service (errors contained if any)&lt;BR /&gt;var response = controller.GetApiResponse();&lt;BR /&gt;&lt;BR /&gt;//validate&lt;BR /&gt;if (response != null)&lt;BR /&gt;{&lt;BR /&gt;if (response.messages.resultCode == messageTypeEnum.Ok)&lt;BR /&gt;{&lt;BR /&gt;if (response.transactionResponse.messages != null)&lt;BR /&gt;{&lt;BR /&gt;Console.WriteLine("Successfully created transaction with Transaction ID: " + response.transactionResponse.transId);&lt;BR /&gt;Console.WriteLine("Response Code: " + response.transactionResponse.responseCode);&lt;BR /&gt;Console.WriteLine("Message Code: " + response.transactionResponse.messages[0].code);&lt;BR /&gt;Console.WriteLine("Description: " + response.transactionResponse.messages[0].description);&lt;BR /&gt;Console.WriteLine("Success, Auth Code : " + response.transactionResponse.authCode);&lt;BR /&gt;}&lt;BR /&gt;else&lt;BR /&gt;{&lt;BR /&gt;Console.WriteLine("Failed Transaction.");&lt;BR /&gt;if (response.transactionResponse.errors != null)&lt;BR /&gt;{&lt;BR /&gt;Console.WriteLine("Error Code: " + response.transactionResponse.errors[0].errorCode);&lt;BR /&gt;Console.WriteLine("Error message: " + response.transactionResponse.errors[0].errorText);&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;else&lt;BR /&gt;{&lt;BR /&gt;Console.WriteLine("Failed Transaction.");&lt;BR /&gt;if (response.transactionResponse != null &amp;amp;&amp;amp; response.transactionResponse.errors != null)&lt;BR /&gt;{&lt;BR /&gt;Console.WriteLine("Error Code: " + response.transactionResponse.errors[0].errorCode);&lt;BR /&gt;Console.WriteLine("Error message: " + response.transactionResponse.errors[0].errorText);&lt;BR /&gt;}&lt;BR /&gt;else&lt;BR /&gt;{&lt;BR /&gt;Console.WriteLine("Error Code: " + response.messages.message[0].code);&lt;BR /&gt;Console.WriteLine("Error message: " + response.messages.message[0].text);&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;else&lt;BR /&gt;{&lt;BR /&gt;Console.WriteLine("Null Response.");&lt;BR /&gt;}&lt;BR /&gt;res = response.ToString();&lt;BR /&gt;}&lt;BR /&gt;catch (Exception ex)&lt;BR /&gt;{&lt;BR /&gt;res = ex.Message;&lt;BR /&gt;}&lt;BR /&gt;//return View(res);&lt;BR /&gt;return RedirectToAction("Index2", "Home");&lt;BR /&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;plz give me solution&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 29 Mar 2017 22:37:06 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Re-User-authentication-failed-due-to-invalid-authentication/m-p/57467#M32187</guid>
      <dc:creator>biru</dc:creator>
      <dc:date>2017-03-29T22:37:06Z</dc:date>
    </item>
    <item>
      <title>Re: User authentication failed due to invalid authentication values.</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Re-User-authentication-failed-due-to-invalid-authentication/m-p/57471#M32190</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.developer.cybersource.com/t5/user/viewprofilepage/user-id/21468"&gt;@biru&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You would get this error if you are using invalid credentials or are using credentials with the wrong enviromentment. &amp;nbsp;For example, sandbox credentials will only work if the environment is set to sandbox, it will not work in production. &amp;nbsp;The same is true for production credentials not working in the sandbox.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use &lt;A href="http://developer.authorize.net/api/reference" target="_self"&gt;authenticateTestRequest&lt;/A&gt; to confirm if the credentials are valid. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Richard&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2017 23:03:15 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Re-User-authentication-failed-due-to-invalid-authentication/m-p/57471#M32190</guid>
      <dc:creator>RichardH</dc:creator>
      <dc:date>2017-03-29T23:03:15Z</dc:date>
    </item>
  </channel>
</rss>

