<?php
require '../config.php';
$merchantid = '04c297ee-2de2-459d-a5b2-2a8a89676e80';
$secrett = '82751fbae2aff85401662e58519dacc90e259ebf29ee22acdfd62ba810d6b3d3';
$hash = hash_hmac('sha256', $merchantid.'/merchant', $secrett);
$link = 'https://api-bisnis.vocagame.com/v1/core/merchant?signature='.$hash;

/*$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api-bisnis.vocagame.com/v1/core/merchant?signature=666cb47f150e85e3157596ab610a07c8410b627169280a2b10fcf376aa0c4cb5',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'X-Merchant: 04c297ee-2de2-459d-a5b2-2a8a89676e80'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

echo '<br><br>';*/
$hashs = hash_hmac('sha256', $merchantid.'/products', $secrett);
$curls = curl_init();

curl_setopt_array($curls, array(
  CURLOPT_URL => 'https://api-bisnis.vocagame.com/v1/core/products?signature='.$hashs,
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'X-Merchant: 04c297ee-2de2-459d-a5b2-2a8a89676e80'
  ),
));

$resp = curl_exec($curls);

curl_close($curls);
echo $resp;

?>