private function gateway($method, $data)
{
$data['userName'] = $this->user_name;
$data['password'] = $this->password;
if ($this->test_mode) {
$url = self::TEST_URL;
} else {
$url = self::PROD_URL;
}
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => $url . $method,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLINFO_HEADER_OUT => true,
CURLOPT_POSTFIELDS => http_build_query($data)
]);
$response = curl_exec($curl);
$response = json_decode($response, true);
$header = curl_getinfo($curl, CURLINFO_HEADER_OUT)
curl_close($curl);
return $response;
}
width:100%;
max-width:1268px;
height:auto;