Correct means to update Drupal Node after user submits a donation
That looks correct, though I have some suggestions for improvement:


Your first step is "retrieve contribution from civicrm database".  The contribution is already going to be stored in $objectRef, so that should be unnecessary.
If you want to avoid coding, you can probably accomplish this with the Drupal Rules and civicrm_entity module.