public function InitFromArrayWithSecret($data, $secret) {
        
        if (!isset($data['paymentState']))
        {
            throw new \InvalidArgumentException('No paymentState provided.');
        }

        $validStates = array('CANCEL', 'PENDING', 'FAILURE', 'SUCCESS');
        $paymentState = $data['paymentState'];
        if (!in_array($paymentState, $validStates))
        {
            throw new \InvalidArgumentException('Invalid paymentState "'
            . $paymentState . '".');
        }

        $this->InitFromArray($data);

        if ($this->GetPaymentState() != 'SUCCESS')
        {
            return;
        }

        $this->CheckFingerprint($secret);
    }