title: Update PayPal Express Checkout Payment with orderId before executing payment
body: <p>So I made my research online, but I can't find any great explanation on how to use <code>Patch</code> method from the classes PayPal give for express checkout.</p>
  
  <p>My checkout process work in 3Steps. </p>
  
  <p><strong>Step1</strong>
  The page where everything begin is a simple "Cart Viewer page", Where there is a button "Checkout With PayPal"
  When we click on that button there is a javascript post request sent to my server asking for it to reply back with a <code>PayPal Link</code> (Where customer will login and approve the transaction)</p>
  
  <p><strong>Step2</strong>
  After customer approved and come back to my website with a <code>PayPal PaymentId</code>, I fetch this Token and gather customer information to autofill the form with the paypal confirm address they have on file</p>
  
  <p><strong>Step3</strong>
  Customer select shipping method and click "PayNow" only then I will create a orderId to his name and send an Update to PayPal with shipping cost and <code>OrderId</code></p>
  
  <p>So here is some code</p>
  
  <p><strong>Step3 Code</strong></p>
  
  <pre><code>//$PaymentId = PayPal Payement Id Customer Returned with from paypal
  //PayerId = PayPal PayerId Customer returned with from paypal
  //$SubTotal,$ShippingCost,$Tax,$Total,$NewOrderNumber = Are setted with appropriate values.
  
  $PP_Payment = PayPal\Api\Payment::get($PaymentId,$PayPalAPIContext);
  $PP_Execution = new PayPal\API\PaymentExecution();
  $PP_Execution -&gt; setPayerId($PayerId);
  
  $PP_Transaction = new \PayPal\Api\Transaction();
  $PP_Amount = new \PayPal\Api\Amount();
  $PP_Details = new \PayPal\Api\Details();
  
  $PP_Details -&gt; setSubtotal($SubTotal);
  $PP_Details -&gt; setShipping($ShippingCost);
  $PP_Details -&gt; setTax($Tax);
  
  $PP_Amount -&gt; setCurrency('CAD');
  $PP_Amount -&gt; setTotal($Total);
  $PP_Amount -&gt; setDetails($PP_Details);
  
  $PP_Transaction -&gt; setInvoiceNumber($NewOrderNumber);
  $PP_Transaction -&gt; setAmount($PP_Amount);
  $PP_Transaction -&gt; setDescription('Order #'.$NewOrderNumber);
  
  $PP_Execution -&gt; addTransaction($PP_Transaction);
  $PP_Payment -&gt; setIntent('sale');
  
  $PP_Response = $PP_Payment -&gt; execute($PP_Execution,$PayPalAPIContext);
  try{
      if($PP_Response -&gt; getState() == 'approved')
      {
          //Stuff to do when transaction did go tru!
      }
  }
  catch(\PayPal\Exception\PayPalConnectionException $e)
  {
      //Error Handeling Code Here!
  }
  </code></pre>
  
  <p>So even though I set these two</p>
  
  <pre><code>$PP_Transaction -&gt; setInvoiceNumber($NewOrderNumber);
  $PP_Transaction -&gt; setAmount($PP_Amount);
  </code></pre>
  
  <p>It does not apply to trasaction on paypal.</p>
  
  <p>So I made some research on how to do that, and found out I need to use </p>
  
  <pre><code>$PP_Patch = new \PayPal\Api\Patch();
  </code></pre>
  
  <p>But there is no documentation on what to use to update invoice number and shipping
  So I tried to improvise with the following code</p>
  
  <pre><code>$PP_Patch = new \PayPal\Api\Patch();
  $PP_Patch -&gt; setOp('add')
      -&gt;setPath('/transactions/0')
      -&gt;setValue(json_decode('{
      "invoice_number":'.$NewOrderNumber.'
      }'));
  
  $PP_Payment -&gt; update($PP_Patch,$PayPalAPIContext);
  </code></pre>
  
  <p>So does anyone has a litle bit of experience with this ? can someone point me out the right dirrection, Or simply a proper documentation that show path to use for the <code>setOp()</code> method</p>