src/icepay_api_base.php
public function validate()
    {
        if ($_SERVER['REQUEST_METHOD'] != 'GET') {
            $this->_logger->log("Invalid request method", Icepay_Api_Logger::ERROR);
            return false;
        }

        $this->_logger->log(sprintf("Page data: %s", serialize($_GET)), Icepay_Api_Logger::NOTICE);

        $this->data->status = (isset($_GET['Status'])) ? $_GET['Status'] : "";
        $this->data->statusCode = (isset($_GET['StatusCode'])) ? $_GET['StatusCode'] : "";
        $this->data->merchant = (isset($_GET['Merchant'])) ? $_GET['Merchant'] : "";
        $this->data->orderID = (isset($_GET['OrderID'])) ? $_GET['OrderID'] : "";
        $this->data->paymentID = (isset($_GET['PaymentID'])) ? $_GET['PaymentID'] : "";
        $this->data->reference = (isset($_GET['Reference'])) ? $_GET['Reference'] : "";
        $this->data->transactionID = (isset($_GET['TransactionID'])) ? $_GET['TransactionID'] : "";
        $this->data->checksum = (isset($_GET['Checksum'])) ? $_GET['Checksum'] : "";

        if ($this->generateChecksumForPage() != $this->data->checksum) {
            $this->_logger->log("Checksum does not match", Icepay_Api_Logger::ERROR);
            return false;
        }

        return true;
    }
public function validate()
    {
        if ($_SERVER['REQUEST_METHOD'] != 'GET') {
            $this->_logger->log("Invalid request method", Icepay_Api_Logger::ERROR);
            return false;
        }

        $this->_logger->log(sprintf("Page data: %s", serialize($_GET)), Icepay_Api_Logger::NOTICE);

        $this->data->status = (isset($_GET['Status'])) ? $_GET['Status'] : "";
        $this->data->statusCode = (isset($_GET['StatusCode'])) ? $_GET['StatusCode'] : "";
        $this->data->merchant = (isset($_GET['Merchant'])) ? $_GET['Merchant'] : "";
        $this->data->orderID = (isset($_GET['OrderID'])) ? $_GET['OrderID'] : "";
        $this->data->paymentID = (isset($_GET['PaymentID'])) ? $_GET['PaymentID'] : "";
        $this->data->reference = (isset($_GET['Reference'])) ? $_GET['Reference'] : "";
        $this->data->transactionID = (isset($_GET['TransactionID'])) ? $_GET['TransactionID'] : "";
        $this->data->checksum = (isset($_GET['Checksum'])) ? $_GET['Checksum'] : "";

        if ($this->generateChecksumForPage() != $this->data->checksum) {
            $this->_logger->log("Checksum does not match", Icepay_Api_Logger::ERROR);
            return false;
        }

        return true;
    }
public function validate ( ) { if ( $ _SERVER [ 'REQUEST_METHOD' ] != 'GET' ) { $ this -> _logger -> log ( "Invalid request method" , Icepay_Api_Logger :: ERROR ) ; return false ; } $ this -> _logger -> log ( sprintf ( "Page data: %s" , serialize ( $ _GET ) ) , Icepay_Api_Logger :: NOTICE ) ; $ this -> data -> status = ( isset ( $ _GET [ 'Status' ] ) ) ? $ _GET [ 'Status' ] : "" ; $ this -> data -> statusCode = ( isset ( $ _GET [ 'StatusCode' ] ) ) ? $ _GET [ 'StatusCode' ] : "" ; $ this -> data -> merchant = ( isset ( $ _GET [ 'Merchant' ] ) ) ? $ _GET [ 'Merchant' ] : "" ; $ this -> data -> orderID = ( isset ( $ _GET [ 'OrderID' ] ) ) ? $ _GET [ 'OrderID' ] : "" ; $ this -> data -> paymentID = ( isset ( $ _GET [ 'PaymentID' ] ) ) ? $ _GET [ 'PaymentID' ] : "" ; $ this -> data -> reference = ( isset ( $ _GET [ 'Reference' ] ) ) ? $ _GET [ 'Reference' ] : "" ; $ this -> data -> transactionID = ( isset ( $ _GET [ 'TransactionID' ] ) ) ? $ _GET [ 'TransactionID' ] : "" ; $ this -> data -> checksum = ( isset ( $ _GET [ 'Checksum' ] ) ) ? $ _GET [ 'Checksum' ] : "" ; if ( $ this -> generateChecksumForPage ( ) != $ this -> data -> checksum ) { $ this -> _logger -> log ( "Checksum does not match" , Icepay_Api_Logger :: ERROR ) ; return false ; } return true ; }
Validate the ICEPAY GET data
@since version 1.0.0
@access public
@return boolean
Validate the ICEPAY GET data