title: Cannot create order Woocommerce rest Api php
body: <p>I tried the following code and tried to post values from android to place an order but every time i test it on chrome it give http 500 error, and Android gives volly server error. Dont know where i am messing up, serious help would be appriciated. Thank You
  Ask me if you need to take a look at the android Code, but i think that doesnot matter here because i am giving hard coded values in $data.</p>
  
  <pre><code>&lt;?php
  
  require_once( 'lib/woocommerce-api.php' );
  
  $pageNum=1;
  $pageNum=$_GET['page_num'];
  
  $options = array(
  'debug'           =&gt; true,
  'return_as_array' =&gt; false,
  'validate_url'    =&gt; false,
  'timeout'         =&gt; 30,
  'ssl_verify'      =&gt; false,
  );
  
  try {
  
  $client = new WC_API_Client( 'https://www.move2mart.com/', 'ck_0afa3a49305683160fe34189553a660053bd4e6239', 'cs_7dc38a7b52c3fdd34qw61e34090be636ae3364b196', $options );
  
  //$data=array();
  $data=[
  'payment_method' =&gt; 'cod',
  'payment_method_title' =&gt; 'Cash on Delivery',
  'set_paid' =&gt; false,
  'billing' =&gt; [
      'first_name' =&gt; 'John',
      'last_name' =&gt; 'Doe',
      'address_1' =&gt; '969 Market',
      'city' =&gt; 'Karachi',
      'email' =&gt; 'princeali@testing.com',
      'phone' =&gt; '03123121995'
  ], 'line_items' =&gt; [
  
      [
          'product_id' =&gt; 779,
          'quantity' =&gt; 1
      ]
  ]
  ];  
  
  print_r($client-&gt;post('orders', $data));
  
  if($_POST !=null) {
  }
  
  else{
    echo "Null POST Request";
  }   
  } catch ( WC_API_Client_Exception $e ) {
  
     echo $e-&gt;getMessage() . PHP_EOL;
     echo $e-&gt;getCode() . PHP_EOL;
  
     if ( $e instanceof WC_API_Client_HTTP_Exception ) {
        print_r( $e-&gt;get_request() );
        print_r( $e-&gt;get_response() );
     }
  }
  </code></pre>