コード例 #1
0
ファイル: Order.php プロジェクト: deenababu92/openpayu_php
 /**
  * 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');
 }
コード例 #2
0
ファイル: Order.php プロジェクト: bonekost/plugin_prestashop
 /**
  * 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');
 }