classes/TokenUtility.php
/**
     * Generates a random key that is used as a unique token for the order record.
     * This token is used as a salt to generate the success and abort token.
     *
     * @return string
     * @throws \Exception
     */
Generates a random key that is used as a unique token for the order record.
This token is used as a salt to generate the success and abort token.

@return string
@throws \Exception
Generates a random key that is used as a unique token for the order record . This token is used as a salt to generate the success and abort token . @return string @throws \ Exception
public static function generateRecordToken()
    {
        $token = bin2hex(openssl_random_pseudo_bytes(self::$keyLength, $strong));
        if (!$strong) {
            throw new \Exception('openssl_random_pseudo_bytes was not able to generate a cryptographical strong key.', 1394640146);
        }
        return $token;
    }
public static function generateRecordToken ( ) { $ token = bin2hex ( openssl_random_pseudo_bytes ( self :: $ keyLength , $ strong ) ) ; if ( ! $ strong ) { throw new \ Exception ( 'openssl_random_pseudo_bytes was not able to generate a cryptographical strong key.' , 1394640146 ) ; } return $ token ; }
Generates a random key that is used as a unique token for the order record.
Generates a random key that is used as a unique token for the order record .