src/PayU/FX/Auth/SignatureGenerator.php
/**
     * Generates a Request object copy, by authenticating the
     * one provided, computing the signature based on the query parameters.
     *
     * @param Request $request
     * @param string $secretKey
     * @return Request Contains the query parameter "signature"
     */
Generates a Request object copy, by authenticating the
one provided, computing the signature based on the query parameters.

@param Request $request
@param string $secretKey
@return Request Contains the query parameter "signature"
Generates a Request object copy by authenticating the one provided computing the signature based on the query parameters . @param Request $request @param string $secretKey @return Request Contains the query parameter " signature "
public function signGetRequest(Request $request, $secretKey)
    {
        $sourceString = '';
        $parameters = parse_query($request->getUri()->getQuery());
        ksort($parameters);
        foreach ($parameters as $parameter) {
            $sourceString .= strlen($parameter) . $parameter;
        }
        $signature = hash_hmac('sha256', $sourceString, $secretKey);
        $uriComponent = $request->getUri();
        $signedUriComponent = Uri::withQueryValue($uriComponent, 'signature', $signature);
        return $request->withUri($signedUriComponent);
    }
public function signGetRequest ( Request $ request , $ secretKey ) { $ sourceString = '' ; $ parameters = parse_query ( $ request -> getUri ( ) -> getQuery ( ) ) ; ksort ( $ parameters ) ; foreach ( $ parameters as $ parameter ) { $ sourceString .= strlen ( $ parameter ) . $ parameter ; } $ signature = hash_hmac ( 'sha256' , $ sourceString , $ secretKey ) ; $ uriComponent = $ request -> getUri ( ) ; $ signedUriComponent = Uri :: withQueryValue ( $ uriComponent , 'signature' , $ signature ) ; return $ request -> withUri ( $ signedUriComponent ) ; }
Generates a Request object copy, by authenticating the
 one provided, computing the signature based on the query parameters.
Generates a Request object copy by authenticating the one provided computing the signature based on the query parameters .