title: PayPal Order Summary Using REST API - - cURL or PHP
body: <p>I am working with the PayPal RESTful API.
  <a href="https://developer.paypal.com/webapps/developer/docs/api/" rel="nofollow noreferrer">https://developer.paypal.com/webapps/developer/docs/api/</a></p>
  
  <p>How can I pass my consumers order items and purchase description to PayPal, so when my user is redirected to PayPal to approve the order by logging in, their order summary will show up on the left.
   .</p>
  
  <p>.</p>
  
  <p><strong>ORDER SUMMARY ON THE LEFT</strong>
  <img src="https://forum.opencart.com/download/file.php?id=5290" alt="paypal empty order summary"></p>
  
  <p>I have tried to passing in the transactions.item_list.items but that information isn't showing up in the order summary still.</p>
  
  <p>Any help how to get an order summary to appear on the paypal approval page using the PayPal RESTful API?</p>
  
  <p>I haven't been to pleased with their documentation as it is lacking some information and also has a few mistakes which wasted decent amount of my time to debug.</p>
  
  <pre><code>//
  // prepare paypal data
  $payment = array(
              'intent' =&gt; 'sale',
              'redirect_urls' =&gt; array(
                  'return_url' =&gt; $url_success,
                  'cancel_url' =&gt; $url_cancel,
                  ),
              'payer' =&gt; array(
                  'payment_method' =&gt; 'paypal'
                  )
            );
  
  //
  // prepare basic payment details
  $payment['transactions'][0] = array(
                              'amount' =&gt; array(
                                  'total' =&gt; '0.03',
                                  'currency' =&gt; 'USD',
                                  'details' =&gt; array(
                                      'subtotal' =&gt; '0.02',
                                      'tax' =&gt; '0.00',
                                      'shipping' =&gt; '0.01'
                                      )
                                  ),
                              'description' =&gt; 'This is the payment transaction description 1.'
                             );
  
  //
  // prepare individual items
  $payment['transactions'][0]['item_list']['items'][] = array(
                                          'quantity' =&gt; '1',
                                          'name' =&gt; 'Womens Large',
                                          'price' =&gt; '0.01',
                                          'currency' =&gt; 'USD',
                                          'sku' =&gt; '31Wf'
                                         );
  $payment['transactions'][0]['item_list']['items'][] = array(
                                          'quantity' =&gt; '1',
                                          'name' =&gt; 'Womens Medium',
                                          'price' =&gt; '0.01',
                                          'currency' =&gt; 'USD',
                                          'sku' =&gt; '31WfW'
                                         );
  
  //
  //format payment array to pass to cURL
  $CURL_POST = json_encode($payment);
  </code></pre>