/** * Consume notification message * * @access public * @param $data Request array received from with PayU OrderNotifyRequest * @return null|OpenPayU_Result Response array with OrderNotifyRequest * @throws OpenPayU_Exception */ public static function consumeNotification($data) { if (empty($data)) { throw new OpenPayU_Exception('Empty value of data'); } $headers = OpenPayU_Util::getRequestHeaders(); $incomingSignature = OpenPayU_HttpCurl::getSignature($headers); self::verifyDocumentSignature($data, $incomingSignature); return OpenPayU_Order::verifyResponse(array('response' => $data, 'code' => 200), 'OrderNotifyRequest'); }
/** * Consume notification message * * @access public * @param $data Request array received from with PayU OrderNotifyRequest * @return null|OpenPayU_Result Response array with OrderNotifyRequest * @throws OpenPayU_Exception */ public static function consumeNotification($data) { $sslConnection = self::isSecureConnection(); if (empty($data)) { throw new OpenPayU_Exception('Empty value of data'); } $headers = OpenPayU_Util::getRequestHeaders(); $incomingSignature = OpenPayU_HttpCurl::getSignature($headers); if ($sslConnection) { self::verifyBasicAuthCredentials(); } else { self::verifyDocumentSignature($data, $incomingSignature); } return OpenPayU_Order::verifyResponse(array('response' => $data, 'code' => 200), 'OrderNotifyRequest'); }