($url, $data = [], $header, $method = 'POST', $time_out = 3)
{
$curl = curl_init();..., false);
if ($method == 'POST') {
curl_setopt($curl, CURLOPT_POST, true);...');
$result = $this->curl($url, '', $header, 'GET');
$result = json_decode($result...');
$result = $this->curl($url, '', $header, 'GET');
$result = json_decode($result...');
$result = $this->curl($url, json_encode($requestData), $header, 'POST');