<?php

namespace Sibs2;

class sibsConstants
{
    const SIBS_PREFIX             = 'sibs';

    const SIBS_PLUGIN_PREFIX      = 'sibs_stg';

    const SIBS_PLUGIN_PREFIX_NAME = 'sibs-stg';

  // DEPRECATION VERSIONS
    const DEPRECATION_PHP_VERSION         = '7.2';  // https://www.php.net/releases/index.php

    const DEPRECATION_WORDPRESS_VERSION   = '3.7';  // https://codex.wordpress.org/WordPress_Versions

    const DEPRECATION_WOOCOMMERCE_VERSION = '3.0';  // https://developer.woocommerce.com/releases/

    // WEBHOOK
    const SIBS_WEBHOOK_ENDPOINT = self::SIBS_PLUGIN_PREFIX_NAME . '/webhook';

    // LANGUAGE SETTINGS
    const SIBS_ACCEPTED_LANGUAGES = [
        'en_US' => 'en',
        'en_GB' => 'en',
        'pt_PT' => 'pt',
        'pl_PL' => 'pl',
    ];

    const SIBS_DEFAULT_LOCALE   = 'en_US';

    const SIBS_DEFAULT_LANGUAGE = 'en';

    // COUNTRY SETTINGS
    const SIBS_ACCEPTED_COUNTRIES = [
        // TODO:
    ];

    // REPORT ISSUE
    const SIBS_REPORT_ISSUE = 'https://payreto.atlassian.net/s/d41d8cd98f00b204e9800998ecf8427e-T/-adsv87/b/4/a44af77267a987a660377e5c46e0fb64/_/download/batch/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector.js?locale=en-US&collectorId=e3a422c7';

    // SPG PAYMENT TYPE CONSTANTS
    const SPG_PAYMENT_TYPE_AUTH = 'AUTH';

    const SPG_PAYMENT_TYPE_PREF = 'PREF';

    const SPG_PAYMENT_TYPE_PURS = 'PURS';

    const SPG_PAYMENT_TYPE_CAPT = 'CAPT';

    const SPG_PAYMENT_TYPE_RFND = 'RFND';

    const SPG_PAYMENT_TYPE_RVSL = 'RVSL';

    const SPG_PAYMENT_TYPE_RCON = 'RCON';

    const SPG_PAYMENT_TYPE_CAUT = 'CAUT';

    const SPG_PAYMENT_TYPE_CPRF = 'CPRF';

    const SPG_PAYMENT_TYPE_STIQ = 'STIQ';

    // WOOCOMMERCE ORDER STATUS CONSTANTS
    const WOOCOMMERCE_ORDER_STATUS_PENDING    = 'wc-pending';

    const WOOCOMMERCE_ORDER_STATUS_PROCESSING = 'wc-processing';

    const WOOCOMMERCE_ORDER_STATUS_ON_HOLD    = 'wc-on-hold';

    const WOOCOMMERCE_ORDER_STATUS_COMPLETED  = 'wc-completed';

    const WOOCOMMERCE_ORDER_STATUS_CANCELLED  = 'wc-cancelled';

    const WOOCOMMERCE_ORDER_STATUS_REFUNDED   = 'wc-refunded';

    const WOOCOMMERCE_ORDER_STATUS_FAILED     = 'wc-failed';

    // SIBS ORDER STATUS CONSTANTS
    const SIBS_ORDER_STATUS_PARTIALLY_CAPTURED = 'wc-part-captured';

    const SIBS_ORDER_STATUS_PARTIALLY_REFUNDED = 'wc-part-refunded';

    const SIBS_ORDER_STATUS_AUTHORIZED         = 'wc-authorized';

    const SIBS_ORDER_STATUS_PENDING_REFUND     = 'wc-pend-refund';

    // LOGS
    const SIBS_LOG          = ['source' => self::SIBS_PLUGIN_PREFIX_NAME . '-log'];

    const SIBS_CRON_LOG     = ['source' => self::SIBS_PLUGIN_PREFIX_NAME . '-cron-log'];

    const SIBS_WEBHOOK_LOG  = ['source' => self::SIBS_PLUGIN_PREFIX_NAME . '-webhook-log'];

    const SIBS_DATA_LOG     = ['source' => self::SIBS_PLUGIN_PREFIX_NAME . '-data-log'];

  // TRANSLATE
    const SIBS_TRANSLATE = 'sibs-woo-stg'; // Same as plugin name

    // PAYMENT METHOD
    const SIBS_PAYMENT_METHOD_CARD        = 'CARD';

    const SIBS_PAYMENT_METHOD_BLIK        = 'BLIK';

    const SIBS_PAYMENT_METHOD_PAYPAL      = 'PAYPAL';

    const SIBS_PAYMENT_METHOD_PAY_BY_LINK = 'PAY_BY_LINK';

    const SIBS_PAYMENT_METHOD_CC          = 'CC';

    const SIBS_PAYMENT_METHOD_DD          = 'DD';

    const SIBS_PAYMENT_METHOD_PBL         = 'PBL';

    const SIBS_PAYMENT_METHOD_PBLKV       = 'PBLKV';

    const SIBS_PAYMENT_METHOD_TOKEN       = 'TOKEN';

    // PAYMENT METHOD ORDER
    const SIBS_PAYMENT_METHOD_ORDER_CREDIT_CARD         = self::SIBS_PLUGIN_PREFIX . '_cc';

    const SIBS_PAYMENT_METHOD_ORDER_CREDIT_CARD_SAVED   = self::SIBS_PLUGIN_PREFIX . '_ccsaved';

    const SIBS_PAYMENT_METHOD_ORDER_DEBIT_CARD          = self::SIBS_PLUGIN_PREFIX . '_dc';

    const SIBS_PAYMENT_METHOD_ORDER_DEBIT_CARD_SAVED    = self::SIBS_PLUGIN_PREFIX . '_dcsaved';

    const SIBS_PAYMENT_METHOD_ORDER_DIRECT_DEBIT        = self::SIBS_PLUGIN_PREFIX . '_dd';

    const SIBS_PAYMENT_METHOD_ORDER_DIRECT_DEBIT_SAVED  = self::SIBS_PLUGIN_PREFIX . '_ddsaved';

    const SIBS_PAYMENT_METHOD_ORDER_PAYPAL              = self::SIBS_PLUGIN_PREFIX . '_paypal';

    const SIBS_PAYMENT_METHOD_ORDER_PAYPAL_SAVED        = self::SIBS_PLUGIN_PREFIX . '_paypalsaved';

    const SIBS_PAYMENT_METHOD_ORDER_PAY_BY_LINK         = self::SIBS_PLUGIN_PREFIX . '_pbl';

    const SIBS_PAYMENT_METHOD_ORDER_PAY_BY_LINK_KEVIN   = self::SIBS_PLUGIN_PREFIX . '_pblkv';

    const SIBS_PAYMENT_METHOD_ORDER_BLIK                = self::SIBS_PLUGIN_PREFIX . '_blik';

    const SIBS_PAYMENT_METHOD_ORDER_EASYCREDIT          = self::SIBS_PLUGIN_PREFIX . '_easycredit';

    const SIBS_PAYMENT_METHOD_ORDER_KLARNAINV           = self::SIBS_PLUGIN_PREFIX . '_klarnainv';

    const SIBS_PAYMENT_METHOD_ORDER_KLARNAINS           = self::SIBS_PLUGIN_PREFIX . '_klarnains';

    const SIBS_PAYMENT_METHOD_ORDER_GIROPAY             = self::SIBS_PLUGIN_PREFIX . '_giropay';

    const SIBS_PAYMENT_METHOD_ORDER_PAYDIREKT           = self::SIBS_PLUGIN_PREFIX . '_paydirekt';

    const SIBS_PAYMENT_METHOD_ORDER_IDEAL               = self::SIBS_PLUGIN_PREFIX . '_ideal';

    const SIBS_PAYMENT_METHOD_ORDER_MASTERPASS          = self::SIBS_PLUGIN_PREFIX . '_masterpass';

    const SIBS_PAYMENT_METHOD_ORDER_SOFORT              = self::SIBS_PLUGIN_PREFIX . '_sofort';

    const SIBS_PAYMENT_METHOD_ORDER_SISSPOSTFINANCE     = self::SIBS_PLUGIN_PREFIX . '_swisspostfinance';

    // REFUND STATUS
    const SIBS_PAYMENT_STATUS_REFUND_COMPLETED = 'completed';

    const SIBS_PAYMENT_STATUS_REFUND_PROGRESS  = 'progress';

    const SIBS_PAYMENT_STATUS_REFUND_FAILED    = 'failed';

    // SIBS RESULT
    const SIBS_RESULT_SUCCESS       = 'Success';

    const SIBS_RESULT_PARTIAL       = 'Partial';

    const SIBS_RESULT_IN_PROCESSING = 'InProcessing';

    const SIBS_RESULT_PENDING       = 'Pending';

    const SIBS_RESULT_DECLINED      = 'Declined';

    const SIBS_RESULT_TIMEOUT       = 'Timeout';

    const SIBS_RESULT_ERROR         = 'Error';

    // ACKNOWLEDGEMENT
    const SIBS_ACK = 'ACK';

    const SIBS_NOK = 'NOK';

    // WOOCOMMERCE META INFO
    const WOOCOMMERCE_POST_TYPE_SHOP_ORDER = 'shop_order';

    // SIBS TOKEN
    const SIBS_TOKEN_NONE         = 'none';

    const SIBS_TOKEN_TOKENIZATION = 'tokenization';

    const SIBS_TOKEN_ONECLICK     = 'oneclick';

    // WEBHOOK
    const WEBHOOK_TEST = 'WebhookTest';

    // PAYMENT SETTINGS
    const SIBS_PAYMENT_DATE_VALUE = '60';

    const SIBS_PAYMENT_DATE_UNIT  = 'minute';

    const SIBS_NUMBER_OF_RETRIES  = '30';

    const SIBS_RETRY_DELAY        = '1';
}
