title: Payment with authorize.net gives error User authentication failed due to invalid authentication values
body: <p>I have followed the link for the payment 
  <a href="https://github.com/AuthorizeNet/sdk-php" rel="nofollow">https://github.com/AuthorizeNet/sdk-php</a>
  but the response "User authentication failed due to invalid authentication values".
  The code works for developer but it does not work for developer but does not work for the live account.</p>
  
  <pre><code>require 'authorizesdk/vendor/autoload.php'; 
  use net\authorize\api\contract\v1 as AnetAPI;
  use net\authorize\api\controller as AnetController;
  
  define("AUTHORIZENET_LOG_FILE","phplog");
  /** Make sure that the WordPress bootstrap has run before continuing. */
  require( dirname(__FILE__) . '/wp-load.php' );
  global $wpdb;
   if ( is_user_logged_in() ) {
    $user_ID = get_current_user_id();
  }
  
  $creditcardno=$_POST['credit_card_number'];
  $expdate=$_POST['year'].'-'.$_POST['month'];
  $invoiceno=$_POST['x_invoice_num'];
  $description=$_POST['x_description'];
  $id=$_POST['x_id'];
  $email=$_POST['x_email'];
  //$creditcardno='';
  //$expdate='16/06';
  //$invoiceno=$_POST['x_invoice_num'];
  //$description=$_POST['x_description'];
  //$id=$_POST['x_id'];
  //$email=$_POST['x_email'];
  
  
  //44Wz7d8Zsr2F5zD6
  // Common setup for API credentials  
    $merchantAuthentication = new AnetAPI\MerchantAuthenticationType();
    $merchantAuthentication-&gt;setName("5Tb3S44sLp");
    $merchantAuthentication-&gt;setTransactionKey("****");
    $refId = 'ref' . time();
  
  // Create the payment data for a credit card
    $creditCard = new AnetAPI\CreditCardType();
    $creditCard-&gt;setCardNumber($_POST['credit_card_number']);  
    $creditCard-&gt;setExpirationDate( $expdate);
    $paymentOne = new AnetAPI\PaymentType();
    $paymentOne-&gt;setCreditCard($creditCard);
  
      // Order info
    $order = new AnetAPI\OrderType();
    $order-&gt;setInvoiceNumber($invoiceno);
    $order-&gt;setDescription($description);
  
    // Customer info 
    $customer = new AnetAPI\CustomerDataType();
    $customer-&gt;setId($id);
    $customer-&gt;setEmail($mail);
  
      // Bill To
    $billto = new AnetAPI\CustomerAddressType();
    $billto-&gt;setFirstName($_POST['credit_card_fname']);
    $billto-&gt;setLastName($_POST['credit_card_lname']);
    $billto-&gt;setCompany($_POST['x_company']);
    $billto-&gt;setAddress($_POST['x_address']);
    $billto-&gt;setCity($_POST['x_city']);
    $billto-&gt;setState($_POST['x_state']);
    $billto-&gt;setZip($_POST['x_zip']);
    $billto-&gt;setCountry($_POST['x_country']);
  
  // Create a transaction
    $transactionRequestType = new AnetAPI\TransactionRequestType();
    $transactionRequestType-&gt;setTransactionType("authCaptureTransaction");   
  //  $transactionRequestType-&gt;setAmount($_POST['x_amount']);
    $transactionRequestType-&gt;setAmount($_POST['x_amount']);
    $transactionRequestType-&gt;setPayment($paymentOne);
    $transactionRequestType-&gt;setOrder($order);
    $transactionRequestType-&gt;setCustomer($customer);
    $transactionRequestType-&gt;setBillTo($billto);
  
    $request = new AnetAPI\CreateTransactionRequest();
    $request-&gt;setMerchantAuthentication($merchantAuthentication);
    $request-&gt;setRefId( $refId);
    $request-&gt;setTransactionRequest($transactionRequestType);
    $controller = new AnetController\CreateTransactionController($request);
    $response = $controller-&gt;executeWithApiResponse(\net\authorize\api\constants\ANetEnvironment::SANDBOX);
  echo '&lt;pre&gt;';
  var_dump($response);exit;
  </code></pre>
  
  <p>Is there any thing that we have to setup properly for the live account.</p>