Code Duplication    Length = 5-5 lines in 2 locations

controllers/front/validation.php 1 location

@@ 43-47 (lines=5) @@
40
            $data = Tools::jsonDecode($json);
41
42
            //validate the callback
43
            if (Configuration::get('PAYLATER_ENVIRONMENT') == 1) {
44
                  $key_to_use = Configuration::get('PAYLATER_ACCOUNT_KEY_LIVE');
45
            } else {
46
                  $key_to_use = Configuration::get('PAYLATER_ACCOUNT_KEY_TEST');
47
            }
48
            $signature_check = sha1(
49
                $key_to_use .
50
                $data->account_id .

paylater.php 1 location

@@ 665-669 (lines=5) @@
662
        );
663
        $amount = str_replace('.', '', $amount);
664
665
        if (Configuration::get('PAYLATER_ENVIRONMENT') == 1) {
666
            $key_to_use = Configuration::get('PAYLATER_ACCOUNT_KEY_LIVE');
667
        } else {
668
            $key_to_use = Configuration::get('PAYLATER_ACCOUNT_KEY_TEST');
669
        }
670
671
        $widget_type = Configuration::get('PAYLATER_WIDGET') == 'false' ?  '0' : '1';
672