HEX
Server: Apache/2.4.25
System: Linux ion14 4.9.0-8-amd64 #1 SMP Debian 4.9.144-3.1 (2019-02-19) x86_64
User: (10087)
PHP: 7.4.30
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,system, exec, shell_exec, passthru, popen, proc_open
Upload Files
File: /home/www/web115/wordpress/wp-content/plugins/digimember/application/model/data/webhook.php
<?php

class digimember_WebhookData extends ncore_BaseData
{
    //
    // protected section
    //
    protected function sqlBaseTableName()
    {
        return 'webhook';
    }

    protected function sqlTableMeta()
    {
       $columns = array(
            'name'                        => 'string[127]',
            'auth_key'                    => 'string[63]',

            'product_ids_comma_seperated' => 'string[255]',

            'add_product_method'          => 'string[7]',
            'add_password_method'         => 'string[7]',
            'add_order_id_method'         => 'string[7]',
            'access_stops_on_method'      => 'string[7]',

            'param_email'                 => 'string[47]',
            'param_first_name'            => 'string[47]',
            'param_last_name'             => 'string[47]',
            'param_product'               => 'string[47]',
            'param_order_id'              => 'string[47]',
            'param_password'              => 'string[47]',
            'param_access_stops_on'       => 'string[47]',

            'is_active'                   => 'yes_no_bit',
            'order_id'                    => 'string[31]',
            'webhook_type'                => 'string[31]',
       );

       $indexes = array( /*'order_id', 'product_id', 'email'*/ );

       $meta = array(
        'columns' => $columns,
        'indexes' => $indexes,
       );

       return $meta;
    }

    protected function buildObject( $obj )
    {
        parent::buildObject( $obj );
    }


    protected function hasTrash()
    {
        return true;
    }

    public function typeLabels()
    {
        $labels = array(
            'newOrder' => _digi('Create order'),
            'cancelOrder' => _digi('Deactivate order'),
        );
        return $labels;
    }

    protected function defaultValues()
    {
        $values = parent::defaultValues();

        $values[ 'param_email' ]        = 'email';
        $values[ 'param_first_name' ]   = 'firstname';
        $values[ 'param_last_name' ]    = 'lastname';
        $values[ 'param_product' ]      = 'product_id';
        $values[ 'param_order_id' ]     = 'order_id';
        $values[ 'param_password' ]     = 'password';
        $values[ 'param_access_stops_on' ] = 'access_stops_on';

        $values[ 'is_active' ]          = 'Y';
        $values[ 'order_id' ]           = _digi( 'Webhook' );
        $values[ 'webhook_type' ]       = 'newOrder';

        $values[ 'add_product_method' ]  = 'by_hook';
        $values[ 'add_password_method' ] = 'by_hook';
        $values[ 'add_order_id_method' ] = 'by_hook';
        $values[ 'access_stops_on_method' ] = 'now';

        $this->api->load->helper( 'string' );
        $values[ 'auth_key' ] = ncore_randomString( 'alnum', 60 );

        return $values;
    }

    protected function hasModified()
    {
        return true;
    }


}