Drupal 7.37, CiviCRM 4.4.15
We are collecting tracking information when a user makes a contribution associated with child sponsorship (using URL parameters, custom fields, and a profile assigned to the contribution form). The tracking information included the id of the Drupal Node that needs to updated. We need to change the Sponsored field, Boolean value, to true after the payment has been processed successfully (credit card or ACH).
Would we use something like this:
myhooks_civicrm_post($op, $objectName, $objectId, &$objectRef) {
if ($op == 'create' && $objectName == 'Contribution') {
//retrieve contribution from civicrm database
//retrieve tracker information from civicrm database
//if tracker.appeal > 0
// retrieve node from drupal database
// update node in drupal database
}