$ip, 'affiliate_tracking_id' => $transaction_id, 'user_agent' => $user_agent, 'registration_url' => $registraion_page ]; $headers = [ 'accept: application/json', 'token: ' . $token, 'Content-Type: application/json' ]; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $response = curl_exec($ch); $responseDecoded = json_decode($response, true); curl_close($ch); ?>