title: How to send 'description' of products to Paypal express (omnipay)?
body: <p>I have setup a checkout system with Ominpay and Paypal express and it worked fine in test mode so I just went 'live' with it. Unfortunately I didn't check whether all the information was sent to paypal after checkout. It seems only the amount and currency are getting sent and not the description/name of the products. This means the seller doesn't know what got sold! </p>
  
  <p>N.B: Everything gets sent to the Paypal checkout page fine. But after payment is made the product names don't show up on the seller's paypal page - only the quantity and price do. </p>
  
  <p>How can I get the product names to show up on the seller's paypal account? It will be an array because multiple products will be sold.</p>
  
  <p>If it helps here's the site: <a href="http://threemarchhares.sukeates.com/" rel="nofollow">http://threemarchhares.sukeates.com/</a></p>
  
  <p>I'm using Laravel 4. My payments controller:</p>
  
  <pre><code>         public function postPayment() { 
  
  
  
          $cart = Session::get('cart'); 
  
          $allProducts = [];
  
          foreach($cart-&gt;aContents as $productID=&gt;$quantity){
  
              $product = Product::find($productID);
  
              $allProducts[] = array('name' =&gt; $product-&gt;name, 'quantity' =&gt; $quantity, 'price'=&gt; $product-&gt;price);
          }
  
          $params = array( 
              'cancelUrl' =&gt; \URL::to('cancel_order'), 
              'returnUrl' =&gt; \URL::to('payment_success'), 
              'amount' =&gt; Input::get('price'), 
              'currency' =&gt; Input::get('currency'), 
              'description' =&gt; Input::get('name'),    //I assume this is wrong as it doesn't work.
  
              ); 
  
  
              Session::put('params', $params); 
  
              Session::save(); 
  
              $gateway = Omnipay::create('PayPal_Express'); 
  
              $gateway-&gt;setUsername('*****'); 
  
              $gateway-&gt;setPassword('****'); 
  
              $gateway-&gt;setSignature('***'); 
  
              $gateway-&gt;setTestMode(false); 
  
              $response = $gateway-&gt;purchase($params)-&gt;setItems($allProducts)-&gt;send();
  
              $data = $response-&gt;getData(); 
  
              if ($response-&gt;isSuccessful()) { 
              // payment was successful: update database
                   print_r($response); 
  
                  }  elseif ($response-&gt;isRedirect()) { 
  
                  // redirect to offsite payment gateway 
                      $response-&gt;redirect(); 
  
                  } else { 
  
                      // payment failed: display message to customer 
                      echo $response-&gt;getMessage();
  
                   } 
  
              } 
  
          public function getSuccessPayment() 
              {   
                  $gateway = Omnipay::create('PayPal_Express');
                  $gateway-&gt;setUsername('****'); 
                  $gateway-&gt;setPassword('****'); 
                  $gateway-&gt;setSignature('*****'); 
                  $gateway-&gt;setTestMode(false); 
  
                  $params = Session::get('params'); 
  
                  $response = $gateway-&gt;completePurchase($params)-&gt;send(); 
                  $paypalResponse = $response-&gt;getData(); // this is the raw response object 
  
                  if(isset($paypalResponse['PAYMENTINFO_0_ACK']) &amp;&amp; $paypalResponse['PAYMENTINFO_0_ACK'] === 'Success') {
  </code></pre>
  
  <p>etc</p>