<?php

return array(
    'custom_html' => array(
        'template_js' => 'js/konnektive.js',
        'enable' => true,
        'template_name' => 'html/konnektive.html'
    ),
    'hooks'    => array(
        array(
            'event'    => 'beforeBodyTagClose',
            'callback' => "Extension\\KonnektiveUtilPack\\ConfirmOrder@injectScript",
            'priority' => 100,
        ),
        array(
            'event'    => 'beforeBodyTagClose',
            'callback' => "Extension\\KonnektiveUtilPack\\CustomerNote@injectScript",
            'priority' => 100,
        ),
        array(
            'event'    => 'beforeBodyTagClose',
            'callback' => "Extension\\KonnektiveUtilPack\\ImportClick@injectScript",
            'priority' => 100,
        ),
        array(
            'event'    => 'afterAnyCrmRequest',
            'callback' => "Extension\\KonnektiveUtilPack\\CustomerNote@savePayload",
            'priority' => 100,
        ),
        array(
            'event'    => 'beforeAnyCrmRequest',
            'callback' => "Extension\\KonnektiveUtilPack\\ImportClick@addSessionId",
            'priority' => 100,
        ),
        array(
            'event'    => 'pageLoad',
            'callback' => "Extension\\KonnektiveUtilPack\\ExtraSources@addDefineParams",
            'priority' => 100,
        ),
        array(
            'event'    => 'beforeAnyCrmRequest',
            'callback' => "Extension\\KonnektiveUtilPack\\ExtraSources@pushParams",
            'priority' => 900,
        ),
        array(
            'event'    => 'afterCrmPayloadReady',
            'callback' => "Extension\\KonnektiveUtilPack\\ExtraSources@bypassZeroValue",
            'priority' => 900,
        ),
        array(
            'event'    => 'afterCrmPayloadReady',
            'callback' => "Extension\\KonnektiveUtilPack\\ImportClick@switchMethod",
            'priority' => 600,
        ),
        array(
            'event'    => 'beforeAnyCrmRequest',
            'callback' => "Extension\\KonnektiveUtilPack\\ExtraSources@addAdditionalParams",
            'priority' => 900,
        ),
        array(
            'event' => 'beforeAnyCrmRequest',
            'callback' => "Extension\\KonnektiveUtilPack\\DirectDebit@captureCrmPayload",
            'priority' => 100,
        ),
        array(
            'event'    => 'beforeAnyCrmRequest',
            'callback' => "Extension\\KonnektiveUtilPack\\ExtraSources@addProductVariation",
            'priority' => 901,
        ),
        array(
            'event'    => 'beforeAnyCrmRequest',
            'callback' => "Extension\\KonnektiveUtilPack\\ExtraSources@addSplitProductVariation",
            'priority' => 901,
        ),
        array(
            'event'    => 'beforeAnyCrmRequest',
            'callback' => "Extension\\KonnektiveUtilPack\\EmerchantResponse@updateCrmPayload",
            'priority' => 100,
        ),
        array(
            'event'    => 'afterAnyCrmRequest',
            'callback' => "Extension\\KonnektiveUtilPack\\EmerchantResponse@captureCrmResponse",
            'priority' => 101,
        ),
        array(
            'event'    => 'beforeAnyCrmRequest',
            'callback' => "Extension\\KonnektiveUtilPack\\PayOn@updateCrmPayload",
            'priority' => 100,
        ),
        array(
            'event'    => 'afterAnyCrmRequest',
            'callback' => "Extension\\KonnektiveUtilPack\\PayOn@captureCrmResponse",
            'priority' => 101,
        ),
        array(
            'event'    => 'beforeAnyCrmRequest',
            'callback' => "Extension\\KonnektiveUtilPack\\ThreeDs@updateCrmPayload",
            'priority' => 100,
        ),
        array(
            'event'    => 'afterAnyCrmRequest',
            'callback' => "Extension\\KonnektiveUtilPack\\ThreeDs@captureCrmResponse",
            'priority' => 101,
        ),
        array(
            'event'    => 'beforeAnyCrmRequest',
            'callback' => "Extension\\KonnektiveUtilPack\\KlarnaResponse@updateCrmPayload",
            'priority' => 100,
        ),
        array(
            'event'    => 'afterAnyCrmRequest',
            'callback' => "Extension\\KonnektiveUtilPack\\KlarnaResponse@captureCrmResponse",
            'priority' => 101,
        ),
        array(
            'event'    => 'beforeAnyCrmRequest',
            'callback' => "Extension\\KonnektiveUtilPack\\Computop3DSV2Response@updateCrmPayload",
            'priority' => 100,
        ),
        array(
            'event'    => 'afterAnyCrmRequest',
            'callback' => "Extension\\KonnektiveUtilPack\\Computop3DSV2Response@captureCrmResponse",
            'priority' => 101,
        ),
        array(
            'event'    => 'beforeAnyCrmRequest',
            'callback' => "Extension\\KonnektiveUtilPack\\PaypalCommerceCheckout@updateCrmPayload",
            'priority' => 950,
        ),
        array(
            'event'    => 'afterAnyCrmRequest',
            'callback' => "Extension\\KonnektiveUtilPack\\PaypalCommerceCheckout@captureCrmResponse",
            'priority' => 101,
        ),
    ),
    'routes'   => array(
        array(
            'slug'     => 'fire-confirm-order',
            'callback' => "Extension\\KonnektiveUtilPack\\ConfirmOrder@fire",
        ),
        array(
            'slug'     => 'send-customer-note',
            'callback' => "Extension\\KonnektiveUtilPack\\CustomerNote@send",
        ),
        array(
            'slug'     => 'fire-import-click',
            'callback' => "Extension\\KonnektiveUtilPack\\ImportClick@fire",
        ),
        array(
            'slug'     => 'emerc-response',
            'callback' => "Extension\\KonnektiveUtilPack\\EmerchantResponse@emercResponse",
        ),
        array(
            'slug'     => 'emerc-response-error',
            'callback' => "Extension\\KonnektiveUtilPack\\EmerchantResponse@emercResponseError",
        ),
        array(
            'slug'     => 'payon-response',
            'callback' => "Extension\\KonnektiveUtilPack\\PayOn@payonResponse",
        ),
        array(
            'slug'     => 'payon-response-error',
            'callback' => "Extension\\KonnektiveUtilPack\\PayOn@payonResponseError",
        ),
        array(
            'slug'     => 'threeDs-response',
            'callback' => "Extension\\KonnektiveUtilPack\\ThreeDs@threeDsResponse",
        ),
        array(
            'slug'     => 'threeDs-response-error',
            'callback' => "Extension\\KonnektiveUtilPack\\ThreeDs@threeDsResponseError",
        ),
        array(
            'slug'     => 'klarna-response',
            'callback' => "Extension\\KonnektiveUtilPack\\KlarnaResponse@klarnaResponse",
        ),
        array(
            'slug'     => 'klarna-response-error',
            'callback' => "Extension\\KonnektiveUtilPack\\KlarnaResponse@klarnaResponseError",
        ),
        array(
            'slug'     => 'computop-response',
            'callback' => "Extension\\KonnektiveUtilPack\\Computop3DSV2Response@computopResponse",
        ),
        array(
            'slug'     => 'computop-response-error',
            'callback' => "Extension\\KonnektiveUtilPack\\Computop3DSV2Response@computopResponseError",
        ),
        array(
            'slug'     => 'paypal-commerce-response',
            'callback' => "Extension\\KonnektiveUtilPack\\PaypalCommerceCheckout@paypalCommerceResponse",
        ),
        array(
            'slug'     => 'paypal-response-error',
            'callback' => "Extension\\KonnektiveUtilPack\\PaypalCommerceCheckout@paypalCommerceResponseError",
        ),
        array(
            'slug'     => 'kon-legacy-paypal-success',
            'callback' => "Extension\\KonnektiveUtilPack\\PaypalCommerceCheckout@paypalLegacyCommerceResponseSuccess",
        ), 
    ),
    'settings' => array(
        array(
            "label"    => "Extra Source Keys",
            "key"      => "extra_source_keys",
            "type"     => "string",
            "hint"     => "Extra paramas name in csv format (e. g: Source1,Source2)",
            "value"    => "",
            "optional" => true,
        ),
        array(
            'label' => 'Activate Membership Service',
            'key'   => 'membership_service',
            'type'  => 'boolean',
            'value' => false,
        ),
        array(
            'label' => 'Activate Insure Shipment',
            'key'   => 'insureship_service',
            'type'  => 'boolean',
            'value' => false,
        ),
        array(
            'label' => 'Allow note for prospect',
            'key'   => 'note_for_prospect',
            'type'  => 'boolean',
            'value' => false,
        ),
        array(
            'label' => 'Skip note',
            'key'   => 'skip_note',
            'type'  => 'boolean',
            'value' => false,
        ),
        array(
            'label' => 'Convert IPv6 To IPv4',
            'key'   => 'convert_ip',
            'type'  => 'boolean',
            'value' => false,
        ),
        array(
            'label' => 'Bypass zero value to CRM',
            'key'   => 'bypass_zero_value',
            'type'  => 'boolean',
            'value' => false,
        ),
        array(
            'label' => 'Activate Shipping ProfileId',
            'key'   => 'activate_ship_profileid',
            'type'  => 'boolean',
            'value' => false,
            'hint'  => 'If enabled shipping price will be ignored'
        ),
    ),
);
