User defined field not updating with PHP code
Change this:

&lt;?php
      $node-&gt;field_productid['0']['value'] = $order-&gt;order_id;
?&gt;


To this:

&lt;?php
      $node-&gt;field_productid[LANGUAGE_NONE][0]['value'] = $order-&gt;order_id;
?&gt;


See if that helps.