title: Curl response unable to decode
body: <p>Not sure why my response returns as string as opposed to JSON. I'm testing an authorize.net intgration procedurally without composer on a server. Can someone help me please?</p>
  
  <pre><code>$API_LOGIN_ID = 'xxxxxxxxxxxxxxx';
  $API_TRANSACTION_KEY = 'xxxxxxxxxxxxxxx';
  $secure_headers = 'xxxxxxxxxxxxxxx';
  
  
  
  
  $merchantAuthentication = array(
      'name' =&gt; $API_LOGIN_ID,
      'transactionKey' =&gt; $API_TRANSACTION_KEY
  );
  
  
  
  $billTo = array(
      'firstName'=&gt;$firstName,
      'lastName'=&gt;$lastName,
      'company'=&gt;$company,
      'address'=&gt;$address,
      'city'=&gt;$city,
      'state'=&gt;$state,
      'zip'=&gt;$zip,
      'country'=&gt;'USA'
  );
  $amount = '123.99';
  $customer = array('email'=&gt;'ferdieserrano@yahoo.com');
  $transactionRequest = array(
      'transactionType' =&gt; 'authCaptureTransaction',
      'amount'=&gt; $amount,
      'customer'=&gt;$customer, 
      'billTo'=&gt;$billTo
  );
  
  
  
  
  $hostedPaymentBillingAddressValue = '{"show": true, "required":true}';
  
  $hostedPaymentBillingAddressOptions = array(
      'settingName'=&gt;'hostedPaymentBillingAddressOptions',
      'settingValue'=&gt; $hostedPaymentBillingAddressValue
  );
  
  $hostedPaymentButtonValue = '{"text" : "Pay Now"}';
  
  $hostedPaymentButtonOptions = array(
      'settingName'=&gt;'hostedPaymentButtonOptions',
      'settingValue'=&gt; $hostedPaymentButtonValue
  );
  
  $hostedPaymentCustomerValue = '{"showEmail":true, "requiredEmail":true}';
  
  $hostedPaymentCustomerOptions = array(
      'settingName'=&gt;'hostedPaymentCustomerOptions',
      'settingValue'=&gt; $hostedPaymentCustomerValue
  );
  $hostedPaymentPaymentValue = '{"cardCodeRequired" : true}';
  
  $hostedPaymentPaymentOptions = array(
      'settingName'=&gt;'hostedPaymentPaymentOptions',
      'settingValue'=&gt; $hostedPaymentPaymentValue
  );
  
  $hostedPaymentReturnOptionsValue = '{"url":"https://www.example.com/continue","urlText":"Continue","cancelUrl":"https://example.com/cancel","cancelUrlText":"Cancel"}';
  $hostedPaymentReturnOptions = array(
      'settingName'=&gt;'hostedPaymentReturnOptions',
      'settingValue'=&gt; $hostedPaymentReturnOptionsValue
  );
  
  $hostedPaymentSecurityOptionsValue = '{"captcha" : true}';
  $hostedPaymentSecurityOptions = array(
      'settingName'=&gt;'hostedPaymentSecurityOptions',
      'settingValue'=&gt; $hostedPaymentSecurityOptionsValue
  );
  
  
  $setting = array($hostedPaymentBillingAddressOptions, $hostedPaymentButtonOptions, $hostedPaymentCustomerOptions, $hostedPaymentPaymentOptions, $hostedPaymentReturnOptions, $hostedPaymentSecurityOptions);
  $hostedPaymentSettings = array('setting'=&gt;$setting);
  $getHostedPaymentPageRequest = array(
      'merchantAuthentication' =&gt; $merchantAuthentication,
      'transactionRequest' =&gt;$transactionRequest,
      'hostedPaymentSettings' =&gt;$hostedPaymentSettings
  );
  $options = array('getHostedPaymentPageRequest'=&gt;$getHostedPaymentPageRequest);
  
  
  $url = "https://apitest.authorize.net/xml/v1/request.api";
  
  $ch = curl_init();
  curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
  curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
  curl_setopt($ch, CURLOPT_VERBOSE, true);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($ch, CURLOPT_URL, $url);
  curl_setopt($ch, CURLOPT_POST, true);
  
  curl_setopt($ch, CURLOPT_POSTFIELDS,json_encode($options));
  curl_setopt($ch, CURLOPT_HTTPHEADER, array(
          'Content-Type: application/json',
          'Accept: application/json'
      )
  ); 
  
  
  
  
  $result = curl_exec($ch);
  curl_close($ch);
  print '&lt;pre&gt;';
  print_r(json_decode($result));
  print '&lt;/pre&gt;';
  var_dump($result);
  </code></pre>
  
  <p>I've been playing around for a while but I'm not getting JSON. Thank you in advance</p>