
//\\////\\////\\////\\////\\////\\////\\////\\////\\////\\////\\////\\////\\////\\////\\////\\////\\////\\////\\////\\////\\////\\////\\//
// Customer hosting functions
//\\////\\////\\////\\////\\////\\////\\////\\////\\////\\////\\////\\////\\////\\////\\////\\////\\////\\////\\////\\////\\////\\////\\//


function AjaxProvisionNewCustomer(CustomerToken) {

    var params = {
        "CustomerToken": CustomerToken,
    };

    $.ajax({
        url: VirtualDirectory + "/Home/AjaxProvisionNewCustomer",
        type: "POST",
        data: JSON.stringify(params),
        contentType: "application/json",
        success: function (response) {
            if (response.Success) {

                ToastMessage("Provision Success", response.CustomerToken);
            }
            else {
                ToastError("Provision New Customer", response.ErrorResults);
            }
        },
        error: function (xhr, status, error) {
            var errormsg = "Error " + xhr.status + ", " + xhr.statusText;
            ToastError("AjaxProvisionNewCustomer", errormsg);
            console.log('AJAX: ' + errormsg);
        }
    });
}

