aminua wrote: Hi,
We are developing a payment gateway compatible with local merchant account providers, we then encountered issue with the hash permitted by CB Subs : _hashString( $string, 'md5', false );
We want to change that to webpay compatible: hash('sha512',$tohash);
However we got an error saying hash() is not defined in CB SUBS.
Please, help with workaround solution.
Environment:
Joomla 3.3
CBSubs 4
Regards,
Hi,
hash() is a standard PHP function:
ch1.php.net/manual/en/function.hash.php
If you use an IDE to develop as a developer, you can ctrl-click any function to see its implementation. In CBSubs, sha512 is supported in function _hashString:
Code:
/**
* Apply hash $algorithm to $string, and upper-case result if $upperCases = true.
*
* @param string $string string to hash
* @param string $algorithm md5, sha1, sha256, sha512
* @param boolean $upperCases Returns hash uppercased
* @return string
*/
protected function _hashString( $string, $algorithm = 'sha1', $upperCases = false ) {
So I'm not sure to understand your question ?