<?php
$clientId = "";
$clientSecret = "";
$base = base64_encode("{$clientId}:{$clientSecret}");
$url = "https://sandbox.boletobancario.com/authorization-server/oauth/token";
$ch = curl_init($url);
curl_setopt($base, CURLOPT_HEADER, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type:application/json'));
$resultado = json_decode(curl_exec($ch));