AuthenticationUtil
in package
Warning:
This class subject to change without prior notice, Please dont use this class directly.
Tags
Table of Contents
- BASE_PATH = '/payments/v1'
- ENCODE_TYPE = 'utf-8'
- HASHING_ALGORITHM = 'sha256'
- KEY_VALUE_SEPARATOR = '='
- PARAMETER_SEPARATOR = '&'
- SEPARATOR = ':'
- computeOPAY1HMACSHA256Hash() : array<string|int, mixed>
- computeOPAY2HMACSHA256Hash() : string
- generateHash() : string
- getFormString() : string
- getHeaderString() : string
- getQueryString() : string
- isValidHeaderParam() : bool
Constants
BASE_PATH
public
mixed
BASE_PATH
= '/payments/v1'
ENCODE_TYPE
public
mixed
ENCODE_TYPE
= 'utf-8'
HASHING_ALGORITHM
public
mixed
HASHING_ALGORITHM
= 'sha256'
KEY_VALUE_SEPARATOR
public
mixed
KEY_VALUE_SEPARATOR
= '='
PARAMETER_SEPARATOR
public
mixed
PARAMETER_SEPARATOR
= '&'
SEPARATOR
public
mixed
SEPARATOR
= ':'
Methods
computeOPAY1HMACSHA256Hash()
public
static computeOPAY1HMACSHA256Hash(string $method, string $resourcePath, array<string|int, mixed> $headerParams, array<string|int, mixed> $queryParams, array<string|int, mixed> $formParams, string $httpBody, string $clientSignatureKey) : array<string|int, mixed>
Parameters
- $method : string
- $resourcePath : string
- $headerParams : array<string|int, mixed>
- $queryParams : array<string|int, mixed>
- $formParams : array<string|int, mixed>
- $httpBody : string
- $clientSignatureKey : string
Tags
Return values
array<string|int, mixed> —computeOPAY2HMACSHA256Hash()
public
static computeOPAY2HMACSHA256Hash(string $client_key, string $api_key, string $secret_key, string $timestamp) : string
Parameters
- $client_key : string
- $api_key : string
- $secret_key : string
- $timestamp : string
Tags
Return values
string —generateHash()
public
static generateHash( $data, $key) : string
Parameters
Return values
string —getFormString()
public
static getFormString([array<string|int, mixed> $params = null ]) : string
Parameters
- $params : array<string|int, mixed> = null
Return values
string —getHeaderString()
public
static getHeaderString([array<string|int, mixed> $inputParameters = null ]) : string
Parameters
- $inputParameters : array<string|int, mixed> = null
Return values
string —getQueryString()
public
static getQueryString([array<string|int, mixed> $inparams = null ]) : string
Parameters
- $inparams : array<string|int, mixed> = null
Return values
string —isValidHeaderParam()
public
static isValidHeaderParam( $data) : bool