src/icepay_api_webservice.php
public function getMerchants()
    {
        $obj = new stdClass();

        // Must be in specific order for checksum --
        $obj->Timestamp = $this->getTimeStamp();
        $obj->SessionID = $this->getSessionID();
        $obj->PinCode = $this->getPinCode();
        $obj->UserAgent = $this->getUserAgent();
        // -----------------------------------------
        // Generate Checksum
        $obj->Checksum = $this->generateChecksum($obj);

        // Ask for getMerchants and get response
        $result = $this->client->getMerChants($obj);
        $result = $result->GetMerchantsResult;
        $merchants = isset($result->Merchants->Merchant) ? $result->Merchants->Merchant : null;

        $obj->Timestamp = $result->Timestamp;

        if (!is_null($merchants)) {
            // Assign all properties of the Merchants object as property of mainObject
            $obj = $this->parseForChecksum($obj, $merchants, true, array("MerchantID", "Description", "TestMode"));
        }

        // Unset properties for new Checksum
        unset($obj->Checksum);

        // Verify response data by making a new Checksum
        $Checksum = $this->generateChecksum($obj);

        // Compare Checksums
        if ($result->Checksum != $Checksum)
            throw new Exception('Data could not be verified');

        return (array) $merchants;
    }
public function getMerchants()
    {
        $obj = new stdClass();

        // Must be in specific order for checksum --
        $obj->Timestamp = $this->getTimeStamp();
        $obj->SessionID = $this->getSessionID();
        $obj->PinCode = $this->getPinCode();
        $obj->UserAgent = $this->getUserAgent();
        // -----------------------------------------
        // Generate Checksum
        $obj->Checksum = $this->generateChecksum($obj);

        // Ask for getMerchants and get response
        $result = $this->client->getMerChants($obj);
        $result = $result->GetMerchantsResult;
        $merchants = isset($result->Merchants->Merchant) ? $result->Merchants->Merchant : null;

        $obj->Timestamp = $result->Timestamp;

        if (!is_null($merchants)) {
            // Assign all properties of the Merchants object as property of mainObject
            $obj = $this->parseForChecksum($obj, $merchants, true, array("MerchantID", "Description", "TestMode"));
        }

        // Unset properties for new Checksum
        unset($obj->Checksum);

        // Verify response data by making a new Checksum
        $Checksum = $this->generateChecksum($obj);

        // Compare Checksums
        if ($result->Checksum != $Checksum)
            throw new Exception('Data could not be verified');

        return (array) $merchants;
    }
public function getMerchants ( ) { $ obj = new stdClass ( ) ; // Must be in specific order for checksum -- $ obj -> Timestamp = $ this -> getTimeStamp ( ) ; $ obj -> SessionID = $ this -> getSessionID ( ) ; $ obj -> PinCode = $ this -> getPinCode ( ) ; $ obj -> UserAgent = $ this -> getUserAgent ( ) ; // ----------------------------------------- // Generate Checksum $ obj -> Checksum = $ this -> generateChecksum ( $ obj ) ; // Ask for getMerchants and get response $ result = $ this -> client -> getMerChants ( $ obj ) ; $ result = $ result -> GetMerchantsResult ; $ merchants = isset ( $ result -> Merchants -> Merchant ) ? $ result -> Merchants -> Merchant : null ; $ obj -> Timestamp = $ result -> Timestamp ; if ( ! is_null ( $ merchants ) ) { // Assign all properties of the Merchants object as property of mainObject $ obj = $ this -> parseForChecksum ( $ obj , $ merchants , true , array ( "MerchantID" , "Description" , "TestMode" ) ) ; } // Unset properties for new Checksum unset ( $ obj -> Checksum ) ; // Verify response data by making a new Checksum $ Checksum = $ this -> generateChecksum ( $ obj ) ; // Compare Checksums if ( $ result -> Checksum != $ Checksum ) throw new Exception ( 'Data could not be verified' ) ; return ( array ) $ merchants ; }
The getMerchant web method returns a list of merchants that belong to your ICEPAY account.

@since version 2.1.0
@access public
@return array
The getMerchant web method returns a list of merchants that belong to your ICEPAY account .