public function checkPaymentResponse(array $data)
    {
        if (!isset($data['MAC'])) {
            return false;
        }

        $data = array_replace([
            'date'        => null,
            'montant'     => null,
            'reference'   => null,
            'texte-libre' => null,
            'code-retour' => null,
            'cvx'         => null,
            'vld'         => null,
            'brand'       => null,
            'status3ds'   => null,
            'numauto'     => null,
            'motifrefus'  => null,
            'originecb'   => null,
            'bincb'       => null,
            'hpancb'      => null,
            'ipclient'    => null,
            'originetr'   => null,
            'veres'       => null,
            'pares'       => null,
        ], $data);

        $macData = [
            $this->config['tpe'],
            $data["date"],
            $data['montant'],
            $data['reference'],
            $data['texte-libre'],
            static::VERSION,
            $data['code-retour'],
            $data['cvx'],
            $data['vld'],
            $data['brand'],
            $data['status3ds'],
            $data['numauto'],
            $data['motifrefus'],
            $data['originecb'],
            $data['bincb'],
            $data['hpancb'],
            $data['ipclient'],
            $data['originetr'],
            $data['veres'],
            $data['pares'],
            null,
        ];

        return strtolower($data['MAC']) === $this->computeMac($macData);
    }
public function checkPaymentResponse(array $data)
    {
        if (!isset($data['MAC'])) {
            return false;
        }

        $data = array_replace([
            'date'        => null,
            'montant'     => null,
            'reference'   => null,
            'texte-libre' => null,
            'code-retour' => null,
            'cvx'         => null,
            'vld'         => null,
            'brand'       => null,
            'status3ds'   => null,
            'numauto'     => null,
            'motifrefus'  => null,
            'originecb'   => null,
            'bincb'       => null,
            'hpancb'      => null,
            'ipclient'    => null,
            'originetr'   => null,
            'veres'       => null,
            'pares'       => null,
        ], $data);

        $macData = [
            $this->config['tpe'],
            $data["date"],
            $data['montant'],
            $data['reference'],
            $data['texte-libre'],
            static::VERSION,
            $data['code-retour'],
            $data['cvx'],
            $data['vld'],
            $data['brand'],
            $data['status3ds'],
            $data['numauto'],
            $data['motifrefus'],
            $data['originecb'],
            $data['bincb'],
            $data['hpancb'],
            $data['ipclient'],
            $data['originetr'],
            $data['veres'],
            $data['pares'],
            null,
        ];

        return strtolower($data['MAC']) === $this->computeMac($macData);
    }
public function checkPaymentResponse ( array $ data ) { if ( ! isset ( $ data [ 'MAC' ] ) ) { return false ; } $ data = array_replace ( [ 'date' => null , 'montant' => null , 'reference' => null , 'texte-libre' => null , 'code-retour' => null , 'cvx' => null , 'vld' => null , 'brand' => null , 'status3ds' => null , 'numauto' => null , 'motifrefus' => null , 'originecb' => null , 'bincb' => null , 'hpancb' => null , 'ipclient' => null , 'originetr' => null , 'veres' => null , 'pares' => null , ] , $ data ) ; $ macData = [ $ this -> config [ 'tpe' ] , $ data [ "date" ] , $ data [ 'montant' ] , $ data [ 'reference' ] , $ data [ 'texte-libre' ] , static :: VERSION , $ data [ 'code-retour' ] , $ data [ 'cvx' ] , $ data [ 'vld' ] , $ data [ 'brand' ] , $ data [ 'status3ds' ] , $ data [ 'numauto' ] , $ data [ 'motifrefus' ] , $ data [ 'originecb' ] , $ data [ 'bincb' ] , $ data [ 'hpancb' ] , $ data [ 'ipclient' ] , $ data [ 'originetr' ] , $ data [ 'veres' ] , $ data [ 'pares' ] , null , ] ; return strtolower ( $ data [ 'MAC' ] ) === $ this -> computeMac ( $ macData ) ; }
Checks the payment response integrity.

@param array $data

@return bool
Checks the payment response integrity .