This question is locked. New answers and comments are not allowed.
if (accessToken != undefined) {
var clientID = $("#txtClientDetailsID").val();
$.ajax({
url: "https://dev-api.safenames.com/clientaccount/" + clientID,
method: "GET",
data: {},
contentType: "application/json; charset=utf-8",
cache: false,
beforeSend: function (xhr) {
/* Authorization header */
xhr.setRequestHeader("Authorization", "Bearer " + accessToken);
},
success: function (response, textStatus, xhr) {
if (response.ClientAccount != null) {
$("#contact-name").html(response.ClientAccount.ContactName); $("#company-id").html(response.ClientAccount.CustomerID);
$("#company-name").html(response.ClientAccount.CompanyName); $("#registrant-name").html(response.ClientAccount.Registrant);
$("#telephone-no").html(response.ClientAccount.TelephoneNumber); $("#fax-no").html(response.ClientAccount.FaxNumber);
$("#email-id").html(response.ClientAccount.EmailAddress); $("#address1").html(response.ClientAccount.Address1);
$("#address2").html(response.ClientAccount.Address2); $("#city").html(response.ClientAccount.City);
$("#state").html(response.ClientAccount.State); $("#postal-code").html(response.ClientAccount.PostalCode);
$("#country-code").html(response.ClientAccount.CountryCode);
$("#clientdetails").css('display', 'inline');
$(".km-content").removeClass("loadingIcon");
}
else {
$(".km-content").removeClass("loadingIcon");
$("#modal_content").html("The customer identifier supplied has not been found in your account structure.");
$("#responseModal").modal('show');
}
},
error: function (xhr, textStatus, errorThrown) {
var errorRes = exceptionHandling(xhr);
$(".km-content").removeClass("loadingIcon");
$("#modal_content").html(errorRes);
$("#responseModal").modal('show');
}
});
}
var clientID = $("#txtClientDetailsID").val();
$.ajax({
url: "https://dev-api.safenames.com/clientaccount/" + clientID,
method: "GET",
data: {},
contentType: "application/json; charset=utf-8",
cache: false,
beforeSend: function (xhr) {
/* Authorization header */
xhr.setRequestHeader("Authorization", "Bearer " + accessToken);
},
success: function (response, textStatus, xhr) {
if (response.ClientAccount != null) {
$("#contact-name").html(response.ClientAccount.ContactName); $("#company-id").html(response.ClientAccount.CustomerID);
$("#company-name").html(response.ClientAccount.CompanyName); $("#registrant-name").html(response.ClientAccount.Registrant);
$("#telephone-no").html(response.ClientAccount.TelephoneNumber); $("#fax-no").html(response.ClientAccount.FaxNumber);
$("#email-id").html(response.ClientAccount.EmailAddress); $("#address1").html(response.ClientAccount.Address1);
$("#address2").html(response.ClientAccount.Address2); $("#city").html(response.ClientAccount.City);
$("#state").html(response.ClientAccount.State); $("#postal-code").html(response.ClientAccount.PostalCode);
$("#country-code").html(response.ClientAccount.CountryCode);
$("#clientdetails").css('display', 'inline');
$(".km-content").removeClass("loadingIcon");
}
else {
$(".km-content").removeClass("loadingIcon");
$("#modal_content").html("The customer identifier supplied has not been found in your account structure.");
$("#responseModal").modal('show');
}
},
error: function (xhr, textStatus, errorThrown) {
var errorRes = exceptionHandling(xhr);
$(".km-content").removeClass("loadingIcon");
$("#modal_content").html(errorRes);
$("#responseModal").modal('show');
}
});
}