Re: Re: Re: Hey--Great module, thanks

Posts: 79
Joined: 12/28/2007
Bug FinderGetting busy with the Ubercode.

Try temporarily replacing the whole function with this one. It will just print the raw output to your screen whenever this function is called.

function uc_cim_curl_send($content) {
  //Build the path to post to, depending on whether we're in test mode or not
  if (variable_get('cim_transaction_mode', 'test') == 'test') {
    $posturl = 'https://apitest.authorize.net/xml/v1/request.api';
  }
  else {
    $posturl = 'https://api.authorize.net/xml/v1/request.api';
  }

  $ch = curl_init();
  curl_setopt($ch, CURLOPT_URL, $posturl);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  curl_setopt($ch, CURLOPT_HTTPHEADER, Array("Content-Type: text/xml"));
  curl_setopt($ch, CURLOPT_HEADER, 1);  //Set to true to return the header in the output - good for debugging, but messes with xml parsing
  curl_setopt($ch, CURLOPT_POSTFIELDS, $content);
  curl_setopt($ch, CURLOPT_POST, 1);
  curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
  $curl_output = curl_exec($ch);
  print_r('<pre>'. $curl_output. '</pre>');
  exit;
  //$response = uc_cim_parse_return(curl_exec($ch));
  //return $response;
}

NEW Authorize.net Customer Information Manager By: xerbutter (76 replies) Wed, 11/21/2007 - 12:50