As suggested here: https://www.drupal.org/node/2789747#comment-11547621, I am attempting to add my own ipn processing to the uc_paypal_ipn menu (as opposed to changing the paypal ipn notification url for ubercart paypal transactions).

Here is my relevant code:

/**
 * Hook Menu Alter.
 */
function cade_menu_alter(&$items) {
    $items['uc_paypal/ipn']['callback'] = 'cade_paypal_ipn';
}
	
/**
 * Ubercart paypal_ipn callback().
 * Process cade ipn, then uc_paypal ipn
 */
function cade_paypal_ipn(){

  // watchdog sent to indicate we are here
  watchdog('ipn_test', 'in cade_paypal_ipn'); // <-- See this function is hit in log
  
  // Send post to cade_ipn as usual for ipn processing
  cade_post_ipn($_POST); // <-- My IPN processing
  
  // Then run the usual Ubercart uc_paypal_ipn() function
  uc_paypal_ipn($_POST); // <-- UC IPN processing
}

The IPNs are processed correctly by UC, but I don't see that my hook_menu_altered callback is run.

Any ideas why this is not working?

Comments

SomebodySysop created an issue. See original summary.

SomebodySysop’s picture

Issue summary: View changes
SomebodySysop’s picture

  $items['uc_paypal/ipn']['page callback'] = 'cade_paypal_ipn';
SomebodySysop’s picture

Status: Active » Closed (fixed)