protected function _registerPaymentCapture() { try { Mage::log("Before looking up PayPal PAP cookie\n"); $papModel = Mage::getModel('pap/pap'); $postData = $this->_request; $customdata = explode('~~~a469ccb0-767c-4fed-96de-99427e1783aa~~~', $postData['custom']); // $saleData = isset($customdata[0]) ? $customdata[0] : null; $cookieValue = isset($customdata[1]) ? $customdata[1] : null; Mage::log("Before PayPal PAP register sale for cookie {$cookieValue}\n"); $papModel->registerOrder($this->_getOrder(), null, isset($cookieValue) ? $cookieValue : null); Mage::log("After successful PayPal PAP register sale for cookie {$cookieValue}\n"); } catch (Exception $e) { Mage::log('Caught exception while trying to log PayPal sale to PAP: ' . $e->getMessage() . "\n"); } parent::_registerPaymentCapture(); }