...
$mail->setFrom('booking@intaxi.si', 'TransferWay - inTaxi.si');
$mail->Subject = '[ CONFIRM RIDE ] - Your get new ride from TransferWay.';
while($row = mysqli_fetch_array($check_driver)){
$mail->clearAddresses();
$mail->addAddress($row['email']);
$url = "https://intaxi.si/accepted.php?order_id=".$order_id."&driver_id=".$row['id'];
}
$mail->msgHTML(' Please confirm ride with this URL - '.$url.'');
$mail->send();
...
let paymentStatus;
$.ajax({
type: "POST",
url: '/vendor/check-payment.php',
data: $(this).serialize(),
success: function(data) {
data = JSON.parse(data);
paymentStatus.val(data['type']);
}
});