Code Duplication    Length = 7-7 lines in 3 locations

paylater.php 3 locations

@@ 609-615 (lines=7) @@
606
            );
607
            $desciption[]= $this->l('Shipping cost');
608
        }
609
        if (Configuration::get('PAYLATER_ENVIRONMENT') == 1) {
610
            //mode live
611
            $account_id = Configuration::get('PAYLATER_ACCOUNT_ID_LIVE');
612
        } else {
613
            //mode test
614
            $account_id = Configuration::get('PAYLATER_ACCOUNT_ID_TEST');
615
        }
616
        //discount
617
        $discount = Configuration::get('PAYLATER_DISCOUNT');
618
        //1.4 fix
@@ 921-927 (lines=7) @@
918
        if (Configuration::get('PAYLATER_CART_WIDGET') == 'false') {
919
            return false;
920
        }
921
        if (Configuration::get('PAYLATER_ENVIRONMENT') == 1) {
922
            //mode live
923
            $account_id = Configuration::get('PAYLATER_ACCOUNT_ID_LIVE');
924
        } else {
925
            //mode test
926
            $account_id = Configuration::get('PAYLATER_ACCOUNT_ID_TEST');
927
        }
928
929
        $data_pmt_type = 2;
930
        $data_pmt_expanded = 'no';
@@ 994-1000 (lines=7) @@
991
        } elseif (!$product->show_price || !$product->available_for_order) {
992
            return false;
993
        }
994
        if (Configuration::get('PAYLATER_ENVIRONMENT') == 1) {
995
            //mode live
996
            $account_id = Configuration::get('PAYLATER_ACCOUNT_ID_LIVE');
997
        } else {
998
            //mode test
999
            $account_id = Configuration::get('PAYLATER_ACCOUNT_ID_TEST');
1000
        }
1001
1002
        $priceDisplay = Product::getTaxCalculationMethod((int)$this->context->cookie->id_customer);
1003
        if (!$priceDisplay || $priceDisplay == 2) {