/**
  * handles the IPN. Gets the gateways model to call the currently-used gateway,
  * and handle the IPN in its desired manner.
  * Expects that the IPN sent a POST or GET requests with parameters 'e_reg_url_link'
  * (which is a registration's REG_url_link value) and 'ee_gateway' (which is the
  * gateway_name of the gateway sending the IPN. Eg, 'PayPal_Standard').
  * Maybe we'll want to die afterwards? For now I'll just let the gateway handle that
  */
 function handle_ipn()
 {
     //in the REQUEST, we expect  reg_url_link, ee_gateway. If not,
     //it must not be an Instant Payment Notification...
     if (isset($_GET['e_reg_url_link']) && isset($_GET['ee_gateway']) || isset($_POST['e_reg_url_link']) && isset($_POST['ee_gateway'])) {
         $transaction = $this->_TXN->get_transaction_from_reg_url_link($_GET['e_reg_url_link']);
         $indicated_gateway = array_key_exists('ee_gateway', $_GET) ? $_GET['ee_gateway'] : $_POST['ee_gateway'];
         $this->_GATEWAYS->set_selected_gateway($indicated_gateway);
         $this->_GATEWAYS->handle_ipn_for_transaction($transaction);
     }
 }