Api.php
public function validateNotificationSignature(array $notification)
    {
        $notification = ArrayObject::ensureArrayObject($notification);
        $notification->validateNotEmpty('Ds_Signature');
        $notification->validateNotEmpty('Ds_MerchantParameters');
        $data = $notification["Ds_MerchantParameters"];

        $key = $this->options['secret_key'];
        $signedResponse = $this->createMerchantSignatureNotif($key, $data);

        return $signedResponse == $notification['Ds_Signature'];
    }
public function validateNotificationSignature(array $notification)
    {
        $notification = ArrayObject::ensureArrayObject($notification);
        $notification->validateNotEmpty('Ds_Signature');
        $notification->validateNotEmpty('Ds_MerchantParameters');
        $data = $notification["Ds_MerchantParameters"];

        $key = $this->options['secret_key'];
        $signedResponse = $this->createMerchantSignatureNotif($key, $data);

        return $signedResponse == $notification['Ds_Signature'];
    }
Validates notification sent by Redsys when it receives the payment

@param array $notification

@return bool