Skip to content

Commit c87c7c5

Browse files
chore(paystack): Add comments
1 parent f70c479 commit c87c7c5

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

src/TransRef.php

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@
1515

1616
class TransRef {
1717

18+
/**
19+
* Get the pool to use based on the type of prefix hash
20+
* @param string $type
21+
* @return string
22+
*/
1823
public static function getPool( $type = 'alnum')
1924
{
2025
switch ( $type ) {
@@ -44,7 +49,12 @@ public static function getPool( $type = 'alnum')
4449
return $pool;
4550
}
4651

47-
52+
/**
53+
* Generate a random secure crypt figure
54+
* @param integer $min
55+
* @param integer $max
56+
* @return integer
57+
*/
4858
public static function secure_crypt($min, $max) {
4959
$range = $max - $min;
5060

@@ -64,6 +74,11 @@ public static function secure_crypt($min, $max) {
6474
return $min + $rnd;
6575
}
6676

77+
/**
78+
* Finally, generate a hashed token
79+
* @param integer $length
80+
* @return string
81+
*/
6782
public static function getHashedToken($length = 25)
6883
{
6984
$token = "";

0 commit comments

Comments
 (0)