Webpay Gateway

9 years 6 months ago #251229 by aminua
Webpay Gateway was created by aminua
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,

Please Log in to join the conversation.

9 years 6 months ago #251244 by beat
Replied by beat on topic Webpay Gateway

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:
/**
	 * 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 ?

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info
The following user(s) said Thank You: aminua

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.151 seconds