So here's what I've done so far:
/includes/auto_loaders/config.myProcessor.php
Code:
<?php
$autoLoadConfig[10][] = array('autoType'=>'class',
'loadFile'=> 'observers/class.myProcessor.php');
$autoLoadConfig[180][] = array('autoType'=>'classInstantiate',
'className'=>'myProcessor',
'objectName'=>'myProcessor');
?>
/includes/classes/observers/class.myProcessor.php
Code:
<?php
class myProcessorextends base {
function __construct() {
$this->attach($this, array('NOTIFY_CHECKOUT_PROCESS_HANDLE_AFFILIATES'));
}
function update(&$class, $eventID, $paramsArray = array())
{
if ($eventID == 'NOTIFY_CHECKOUT_PROCESS_HANDLE_AFFILIATES')
{
//DO SOMETHING
}
}
}
It seems to be working. What I'm not sure on is if "NOTIFY_CHECKOUT_PROCESS_HANDLE_AFFILIATES" is appropriate (I used it because it appeared to be around the right place in the code for tapping in) and I'm especially unsure on the values I used for autloading (10 and 180). I went with 10 because the wiki used that for its example and I used 180 because PayPal uses up to 170 in paypal_ipn.core.php but really I don't understand it enough to say that was an informed guess.
Bookmarks