title: Required Field Missing. PHP Paypal REST API
body: <p>I'm currently trying to use the PHP PayPal REST API. However, it seems I am unable to pass a list of items through a transaction because "required field(s) are missing".</p>
  
  <pre><code>$item = new Item();
  $item-&gt;setQuantity("1");
  $item-&gt;setName("stuff");
  $item-&gt;setPrice("305.00");
  $item-&gt;setCurrency("USD");
  
  $amount = new Amount();
  $amount-&gt;setCurrency("USD");
  $amount-&gt;setTotal("305.00");
  
  $item_list = new ItemList();
  $item_list-&gt;setItems(array($item));
  
  $transaction = new Transaction();
  $transaction-&gt;setAmount($amount);
  $transaction-&gt;setDescription("This is incredibly awesome.");
  $transaction-&gt;setItem_list($item_list);
  </code></pre>
  
  <p>I've filled all the fields that Paypal's documentation deems as "required" as per "Common Objects" in the documentation (<a href="https://developer.paypal.com/webapps/developer/docs/api/#common-objects" rel="nofollow">https://developer.paypal.com/webapps/developer/docs/api/#common-objects</a>). But I am being thrown this error when I try to redirect to Paypal to start the transaction:</p>
  
  <blockquote>
    <p>Exception: Got Http response code 400 when accessing
    <a href="https://api.sandbox.paypal.com/v1/payments/payment" rel="nofollow">https://api.sandbox.paypal.com/v1/payments/payment</a>. string(269)
    "{"name":"VALIDATION_ERROR","details":[{"field":"transactions[0].item_list.items[0].sku","issue":"Required
    field missing"}],"message":"Invalid request - see
    details","information_link":"<a href="https://developer.paypal.com/docs/api/#VALIDATION_ERROR" rel="nofollow">https://developer.paypal.com/docs/api/#VALIDATION_ERROR</a>","debug_id":"9e292fc3a312d"}"</p>
  </blockquote>
  
  <p>When I comment out $transaction->setItem_list($item_list);, it works properly. So it's obvious that something is missing in the item list or the item. But I can't see what.</p>
  
  <p>Any ideas?</p>