Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #2
SomebodySysop CreditAttribution: SomebodySysop commentedComment #3
SomebodySysop CreditAttribution: SomebodySysop commentedComment #4
SomebodySysop CreditAttribution: SomebodySysop commented