src/paySystems/YandexKassaPaySystem.php
static private function _verifySign()
    {
        $descriptorspec = [0 => ["pipe", "r"], 1 => ["pipe", "w"], 2 => ["pipe", "w"]];
        $certificate = \Yii::getAlias('@skeeks/cms/shop/paySystems/yandexkassa/pksc7-key-for-encode.cer');

        \Yii::info("_verifySign(): {$certificate}", YandexKassaPaySystem::class);

        $process = proc_open('openssl smime -verify -inform PEM -nointern -certfile '.$certificate.' -CAfile '.$certificate,
            $descriptorspec, $pipes);

        if (is_resource($process)) {

            \Yii::info("_verifySign() is_resource: true", YandexKassaPaySystem::class);

            // Getting data from request body.
            $data = file_get_contents("php://input"); // "php://input"
            fwrite($pipes[0], $data);
            fclose($pipes[0]);
            $content = stream_get_contents($pipes[1]);
            fclose($pipes[1]);
            $resCode = proc_close($process);

            if ($resCode != 0) {
                \Yii::info("resCode(): {$resCode}", YandexKassaPaySystem::class);
                return null;
            } else {
                \Yii::info("_verifySign() content: {$content}", YandexKassaPaySystem::class);
                $xml = simplexml_load_string($content);
                $array = json_decode(json_encode($xml), true);
                return $array["@attributes"];
            }
        }

        return null;
    }
static private function _verifySign()
    {
        $descriptorspec = [0 => ["pipe", "r"], 1 => ["pipe", "w"], 2 => ["pipe", "w"]];
        $certificate = \Yii::getAlias('@skeeks/cms/shop/paySystems/yandexkassa/pksc7-key-for-encode.cer');

        \Yii::info("_verifySign(): {$certificate}", YandexKassaPaySystem::class);

        $process = proc_open('openssl smime -verify -inform PEM -nointern -certfile '.$certificate.' -CAfile '.$certificate,
            $descriptorspec, $pipes);

        if (is_resource($process)) {

            \Yii::info("_verifySign() is_resource: true", YandexKassaPaySystem::class);

            // Getting data from request body.
            $data = file_get_contents("php://input"); // "php://input"
            fwrite($pipes[0], $data);
            fclose($pipes[0]);
            $content = stream_get_contents($pipes[1]);
            fclose($pipes[1]);
            $resCode = proc_close($process);

            if ($resCode != 0) {
                \Yii::info("resCode(): {$resCode}", YandexKassaPaySystem::class);
                return null;
            } else {
                \Yii::info("_verifySign() content: {$content}", YandexKassaPaySystem::class);
                $xml = simplexml_load_string($content);
                $array = json_decode(json_encode($xml), true);
                return $array["@attributes"];
            }
        }

        return null;
    }
Checking for sign when XML/PKCS#7 scheme is used.
@return array if request is successful, returns key-value array of request params, null otherwise.