Answers.Body: <p>Commerce V1 - You can use a hooks for this:</p>
  
  <p><a href="https://craftcommerce.com/docs/hooks-reference#commerce_modifygatewayrequestdata" rel="nofollow noreferrer">https://craftcommerce.com/docs/hooks-reference#commerce_modifygatewayrequestdata</a></p>
  
  <p>or</p>
  
  <p><a href="https://craftcommerce.com/docs/hooks-reference#commerce_modifypaymentrequest" rel="nofollow noreferrer">https://craftcommerce.com/docs/hooks-reference#commerce_modifypaymentrequest</a></p>
  
  <p>...basically, start by dumping all the data to look at what is being sent, then modify it as you need.  Here's an example of something similar (I truncate the data to make sure it fits the gateway's limits):</p>
  
  <pre><code>    public function commerce_modifyGatewayRequestData($data,$type,$transaction){
  
          # Dump the data to see what is there....
          BusinessLogicPlugin::log("commerce_modifyGatewayRequestData"); 
          BusinessLogicPlugin::log("data");
          BusinessLogicPlugin::log($data);
          BusinessLogicPlugin::log("type");
          BusinessLogicPlugin::log($type);
          BusinessLogicPlugin::log("transaction");
          BusinessLogicPlugin::log($transaction);
  
          # TRUNCATE any over-sized data eWay might not like....
          # Data limits come from here: https://eway.io/api-v3/#direct-connection
  
         if(isset($data['Customer']['FirstName']))
          $data['Customer']['FirstName'] = substr($data['Customer']['FirstName'], 0, 49);
  
         ... etc
  
        return $data;
     }
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-05-23T04:14:25.123Z
Answers.LastActivityDate: 2018-05-23T04:14:25.123Z
Answers.UserDisplayName: Jeremy Daalder
Body: <p>The client is using PayPal Express for the payment gateway. When orders are placed, Paypal shows the ID for the order, not the Order Number. Is there somewhere I can change that?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-05-23T02:13:59.997Z
Comments.Text: Commerce 1 or 2-beta?
Comments.UserDisplayName: Luke Holder
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-05-23T12:31:39.940Z
Comments.Text: Commerce v1.2.1362, sorry.
Comments.UserDisplayName: smartpill
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-05-23T13:25:14.493Z
Comments.Text: I guess I also meant order.shortNumber since that's what appears in the Control Panel and on the order confirmation.
Comments.UserDisplayName: smartpill
Tags: <plugin-craftcommerce><ordering>
Title: How do I send PayPal the Craft Commerce Order Number?
ThreadText: # How do I send PayPal the Craft Commerce Order Number?
  
  (Asked by: username_0 on 2018-05-22)
  
  The client is using PayPal Express for the payment gateway. When orders are placed, Paypal shows the ID for the order, not the Order Number. Is there somewhere I can change that?
  
  **Tags:** plugin-craftcommerce, ordering
  
  > **Comments:**
  > **username_1**: Commerce 1 or 2-beta?  
  > **username_0**: Commerce v1.2.1362, sorry.  
  > **username_0**: I guess I also meant order.shortNumber since that's what appears in the Control Panel and on the order confirmation.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2018-05-23. Score: 1
  
  Commerce V1 - You can use a hooks for this:
  
  <https://craftcommerce.com/docs/hooks-reference#commerce_modifygatewayrequestdata>
  
  or
  
  <https://craftcommerce.com/docs/hooks-reference#commerce_modifypaymentrequest>
  
  ...basically, start by dumping all the data to look at what is being sent, then modify it as you need. Here's an example of something similar (I truncate the data to make sure it fits the gateway's limits):
  
  ```
      public function commerce_modifyGatewayRequestData($data,$type,$transaction){
  
          # Dump the data to see what is there....
          BusinessLogicPlugin::log("commerce_modifyGatewayRequestData"); 
          BusinessLogicPlugin::log("data");
          BusinessLogicPlugin::log($data);
          BusinessLogicPlugin::log("type");
          BusinessLogicPlugin::log($type);
          BusinessLogicPlugin::log("transaction");
          BusinessLogicPlugin::log($transaction);
  
          # TRUNCATE any over-sized data eWay might not like....
          # Data limits come from here: https://eway.io/api-v3/#direct-connection
  
         if(isset($data['Customer']['FirstName']))
          $data['Customer']['FirstName'] = substr($data['Customer']['FirstName'], 0, 49);
  
         ... etc
  
        return $data;
     }
  
  ```
  
  
  ---
  
  