title: (13) The merchant login ID or password is invalid or the account is inactive.(usig Aim method for authorize.net)
body: <p>So when i am defining action as payment.php all working fine but as soon as i define action post_url its giving me this error. So please assist me. all the log in credential for test account is ok and checked.</p>
  
  <p>here is my check out.php form action </p>
  
  <pre><code>&lt;?php  include_once('payment.php');  ?&gt; 
  &lt;form  method="post" action='&lt;?php echo $post_url; ?&gt;'&gt;
  </code></pre>
  
  <p>here is my payment.php file contain all the information about url and key values</p>
  
  <pre><code>&lt;?php
  
  
          //log in credentials and key values 
  
          $LOGINKEY = '24Xd2WdY';// x_login
  
  
          $TRANSKEY = 'xxxx';//x_tran_key
  
          $firstName =urlencode( $_POST['first_name']);
  
          $lastName =urlencode($_POST['last_name']);
  
          $creditCardType =urlencode( $_POST['card_type']);
  
          $creditCardNumber = urlencode($_POST['cardnumber']);
  
          $expDateMonth =urlencode( $_POST['cardmonth']); 
  
          // Month must be padded with leading zero
          $padDateMonth = str_pad($expDateMonth, 2, '0', STR_PAD_LEFT);
  
          $expDateYear =urlencode( $_POST['cardyear']);
  
          $cvv2Number = urlencode($_POST['cardsecuritycode']);
  
          $address1 = urlencode($_POST['street1']);
  
          $city = urlencode($_POST['city']);
  
          $state =urlencode( $_POST['state']);
  
          $zip = urlencode($_POST['zipcode']);
  
          $country = urlencode($_POST['country']);
  
          $company = urlencode($_POST['company']);
  
          $email = urlencode($_POST['email']);
  
          $phone = urlencode($_POST['phone']);
  
          $invoice_number=urlencode($_POST['order_id']);
  
          $amount = urlencode($_POST['amount_charged']);
  
          $currencyCode="USD";
  
          $paymentType="Sale";
  
          $date = $expDateMonth.$expDateYear;\
  
  
      $post_values = array(
  
          "x_login"       =&gt; "$LOGINKEY",
  
          "x_tran_key"        =&gt; "$TRANSKEY",
  
          "x_version"         =&gt; "3.1",
          "x_delim_data"      =&gt; "TRUE",
          "x_delim_char"      =&gt; "|",
          "x_relay_response"  =&gt; "FALSE",
          //"x_market_type"       =&gt; "2",
          "x_device_type"     =&gt; "1",
          "x_type"        =&gt; "AUTH_CAPTURE",
          "x_method"      =&gt; "CC",
          "x_card_num"        =&gt; $creditCardNumber,
          "x_invoice_num"     =&gt;  $invoice_number,
          "x_exp_date"        =&gt; $date,
          "x_amount"      =&gt; $amount,
          //"x_description"   =&gt; "Sample Transaction",
          "x_first_name"      =&gt; $firstName,
          "x_last_name"       =&gt; $lastName,
          "x_address"     =&gt; $address1,
          "x_state"       =&gt; $state,
          "x_city"        =&gt;$city,
          "x_country"     =&gt;$country,
          "x_company"     =&gt;$company,
          "x_email"       =&gt;$email,
          "x_phone"       =&gt;$phone,
  
          "x_response_format" =&gt; "1",
          "x_zip"         =&gt; $zip
  
  
          // Additional fields can be added here as outlined in the AIM integration
          // guide at: http://developer.authorize.net
      );
  
      //echo '&lt;pre&gt;'; echo 'Request values'; print_r($post_values);
      //comment the above line. i have given this just for testing purpose.
  
      $post_string = "";
      foreach( $post_values as $key =&gt; $value )$post_string .= "$key=" . urlencode( $value ) . "&amp;";
      $post_string = rtrim($post_string,"&amp; ");
  
      //for test mode use the followin url
      $post_url = "https://test.authorize.net/gateway/transact.dll";
      //for real accounts (even in test mode), please make sure that you are posting to 
      //$post_url = "https://secure.authorize.net/gateway/transact.dll"; 
  
      $request = curl_init($post_url); // initiate curl object
      curl_setopt($request, CURLOPT_HEADER, 0); // set to 0 to eliminate header info from response
      curl_setopt($request, CURLOPT_RETURNTRANSFER, 1); // Returns response data instead of TRUE(1)
      curl_setopt($request, CURLOPT_POSTFIELDS, $post_string); // use HTTP POST to send form data
      curl_setopt($request, CURLOPT_SSL_VERIFYPEER, FALSE); // uncomment this line if you get no gateway response.
      $post_response = curl_exec($request); // execute curl post and store results in $post_response
      // additional options may be required depending upon your server configuration
      // you can find documentation on curl options at http://www.php.net/curl_setopt
      curl_close ($request); // close curl object
  
      // This line takes the response and breaks it into an array using the specified delimiting character
      $response_array = explode($post_values["x_delim_char"],$post_response);
  
  
      //echo '&lt;br&gt;&lt;br&gt; Response Array'; print_r($response_array);
      //remove this line. i have used this just print the response array
  
      if($response_array[0]==2||$response_array[0]==3) 
      {
          //success 
          echo '&lt;b&gt;Payment Failure&lt;/b&gt;. &lt;br&gt;';
          echo '&lt;b&gt;Error String&lt;/b&gt;: '.$response_array[3];
  
  
          echo '&lt;br&gt;&lt;br&gt;Press back button to go back to the previous page';
      }
      else
      {
          $ptid = $response_array[6];
          $ptidmd5 = $response_array[7];
          $status=$response_array[0];
  
  
          echo "$ptid "."Payment Success";
          echo"$status";
      }
      if ($status==1) {
  
          require_once('Rescue_soap.php');
          $new_soap = new Rescuesoap();
          $new_soap-&gt;check_contacts($_REQUEST);
          }
  ?&gt;
  </code></pre>
  
  <p>thanks for help</p>