title: Safest way to pass data into a controller?
body: <p>I'm integrating PayPal into my Laravel 5 site.</p>
  
  <p>I have this function:</p>
  
  <pre><code>public function getCheckout() {
      $payer = PayPal::Payer();
      $payer-&gt;setPaymentMethod('paypal');
  
      return Input::all();
      $amount = PayPal:: Amount();
      $amount-&gt;setCurrency('USD');
      $amount-&gt;setTotal(42); // This is the simple way,
  
      // you can alternatively describe everything in the order separately;
      // Reference the PayPal PHP REST SDK for details.
  
      $transaction = PayPal::Transaction();
      $transaction-&gt;setAmount($amount);
      $transaction-&gt;setDescription('Bid Purchase');
  
      $redirectUrls = PayPal:: RedirectUrls();
      $redirectUrls-&gt;setReturnUrl(action('PayPalController@getDone'));
      $redirectUrls-&gt;setCancelUrl(action('PayPalController@getCancel'));
  
      $payment = PayPal::Payment();
      $payment-&gt;setIntent('sale');
      $payment-&gt;setPayer($payer);
      $payment-&gt;setRedirectUrls($redirectUrls);
      $payment-&gt;setTransactions(array($transaction));
  
      $response = $payment-&gt;create($this-&gt;_apiContext);
      $redirectUrl = $response-&gt;links[1]-&gt;href;
  
      return Redirect::to($redirectUrl);
  }
  </code></pre>
  
  <p>I want to be able to select the <code>setTotal</code> amount before going to <code>getCheckout()</code>.</p>
  
  <p>What would be the safest way to do this so the values can't be tampered with?</p>
  
  <p>Thanks</p>