Verificar situação de voucher
Esse serviço quando consumido, verifica os parâmetros e retorna todas as informações referentes ao voucher informado.
Situacaovoucher
Headers
Name
Type
Description
Request Body
Name
Type
Description
Código de exemplo
<?php
$usuario = "central.integracoes";
$senha = "e9edbcd6fg0ah8efdbdsb9d5dd6403a60327d63c87892c58544540ea73d188a3cc";
$voucher = "001gd7458f09";
$key = $senha;
$nonce = time() . rand(1000, 9999);
$hkey = $nonce . $key;
$hash_hkey = hash("sha256", $hkey);
$dados = $usuario . $nonce . $voucher;
$hash_hkey_dados = hash("sha256", $hkey . $dados);
$hmac = hash("sha256", $hash_hkey . $hash_hkey_dados);
try {
$soap = new SoapClient("https://gvs.ca.inf.br/GVS/webservices/GVSServices.jws?wsdl", array(
'trace' => 1,
'soap_version' => SOAP_1_2,
'cache_wsdl' => WSDL_CACHE_NONE,
'stream_context' => stream_context_create(
array(
'ssl' => array(
'verify_peer' => false,
'verify_peer_name' => false
))))
);
$jsonReq = array(
'usuario' => $usuario,
'nonce' => $nonce,
'voucher' => $voucher,
'Hmac' => $hmac
);
$resposta = call_user_func_array(array($soap, 'situacaovoucher'), $jsonReq);
echo ($resposta);
} catch (Exception $e) {
echo $e->getMessage();
}Tipos de respostas
Last updated