src/icepay_api_webservice.php
public function validatePhoneCode($paymentID, $phoneCode)
    {
        $obj = new StdClass();

        // Must be in specific order for checksum ---------        
        $obj->MerchantID = $this->getMerchantID();
        $obj->Timestamp = $this->getTimeStamp();
        $obj->PaymentID = $paymentID;
        $obj->PhoneCode = $phoneCode;

        $obj->Checksum = $this->generateChecksum($obj, $this->getSecretCode());

        $result = $this->client->ValidatePhoneCode(array('request' => $obj));
        $result = $result->ValidatePhoneCodeResult;

        /* store the checksum momentarily */
        $checksum = $result->Checksum;

        /* Replace the checksum in the data with secretCode to generate a new checksum */
        $result->Checksum = $this->getSecretCode();

        /* Verify response data */
        if ($checksum != $this->generateChecksum($result))
            throw new Exception("Data could not be verified");

        return $result->Success;
    }
public function validatePhoneCode($paymentID, $phoneCode)
    {
        $obj = new StdClass();

        // Must be in specific order for checksum ---------        
        $obj->MerchantID = $this->getMerchantID();
        $obj->Timestamp = $this->getTimeStamp();
        $obj->PaymentID = $paymentID;
        $obj->PhoneCode = $phoneCode;

        $obj->Checksum = $this->generateChecksum($obj, $this->getSecretCode());

        $result = $this->client->ValidatePhoneCode(array('request' => $obj));
        $result = $result->ValidatePhoneCodeResult;

        /* store the checksum momentarily */
        $checksum = $result->Checksum;

        /* Replace the checksum in the data with secretCode to generate a new checksum */
        $result->Checksum = $this->getSecretCode();

        /* Verify response data */
        if ($checksum != $this->generateChecksum($result))
            throw new Exception("Data could not be verified");

        return $result->Success;
    }
public function validatePhoneCode ( $ paymentID , $ phoneCode ) { $ obj = new StdClass ( ) ; // Must be in specific order for checksum ---------         $ obj -> MerchantID = $ this -> getMerchantID ( ) ; $ obj -> Timestamp = $ this -> getTimeStamp ( ) ; $ obj -> PaymentID = $ paymentID ; $ obj -> PhoneCode = $ phoneCode ; $ obj -> Checksum = $ this -> generateChecksum ( $ obj , $ this -> getSecretCode ( ) ) ; $ result = $ this -> client -> ValidatePhoneCode ( array ( 'request' => $ obj ) ) ; $ result = $ result -> ValidatePhoneCodeResult ; /* store the checksum momentarily */ $ checksum = $ result -> Checksum ; /* Replace the checksum in the data with secretCode to generate a new checksum */ $ result -> Checksum = $ this -> getSecretCode ( ) ; /* Verify response data */ if ( $ checksum != $ this -> generateChecksum ( $ result ) ) throw new Exception ( "Data could not be verified" ) ; return $ result -> Success ; }
The ValidatePhoneCode web method verifies the code that the end-user must provide in
order to start a phone payment.

@since 2.1.0
@access public
@param int $paymentID
@param int $phoneCode
@return bool success
The ValidatePhoneCode web method verifies the code that the end - user must provide in order to start a phone payment .