HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux ip-172-31-42-149 5.15.0-1084-aws #91~20.04.1-Ubuntu SMP Fri May 2 07:00:04 UTC 2025 aarch64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/vhost/disk-apps/comfama.sports-crowd.com/public/js/paymentsValidator.js
$(document).ready(function () {
    $("#ref_transaction").keyup(function () {
        $("#id_transaction").val("");
    });

    _table = $("#example2").DataTable({
        responsive: true,
        processing: true,
        serverSide: false,
        order: [],
        language: {
            url: "https://cdn.datatables.net/plug-ins/1.10.19/i18n/Spanish.json",
        },
        columns: [
            { data: "line", name: "line", width: "10%" },
            { data: "message", name: "message", width: "90%" },
            { data: "line2", name: "line2", width: "90%" },
            { data: "line3", name: "line3", width: "90%" },
        ],
    });
});

function referenceData() {
    var refTransaction = $("#ref_transaction").val();
    if (!refTransaction) {
        swal("Error", Lang.get('messages.ref_wompi.title_3') + ' is required', "error");
        return;
    }
    var url = '/store/getTransactionByReference?reference=' + refTransaction;

    $('#loading').show();
    output("");
    $.ajax({
        type: "POST",
        dataType: "json",
        processData: false,
        contentType: false,
        headers: {
            "X-CSRF-TOKEN": $('meta[name="csrf-token"]').attr("content"),
        },
        url: url,
        success: function (r) {
            $('#loading').hide();
            if (r.d) {
                var str = JSON.stringify(r.d, undefined, 4);
                output(syntaxHighlight(str));

                if (r.r) {
                    swal("Datos obtenidos", {
                        icon: "success",
                        timer: 2700,
                        showConfirmButton: false,
                        buttons: false,
                    });
                }
            } else {
                swal("Error", r.m, "error");
            }
        },
        error: function (err) {
            $('#loading').hide();
            swal("Error", err.responseJSON.message, "error");
        },
    });
}

function output(inp) {
    $(".jsonPre").html(inp);
}

function syntaxHighlight(json) {
    json = json
        .replace(/&/g, "&")
        .replace(/</g, "&lt;")
        .replace(/>/g, "&gt;");
    return json.replace(
        /("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)/g,
        function (match) {
            var cls = "number";
            if (/^"/.test(match)) {
                if (/:$/.test(match)) {
                    cls = "key";
                } else {
                    cls = "string";
                }
            } else if (/true|false/.test(match)) {
                cls = "boolean";
            } else if (/null/.test(match)) {
                cls = "null";
            }
            return '<span class="' + cls + '">' + match + "</span>";
        }
    );
}