Code Duplication    Length = 9-9 lines in 2 locations

admin/gateways/paypal/gateway.php 2 locations

@@ 147-155 (lines=9) @@
144
     * @param $cmd_id
145
     * @return string
146
     */
147
    public function getRedirectURL($cmd_total, $cmd_id)
148
    {
149
        $test_mode = (int)$this->handlers->h_oledrion_gateways_options->getGatewayOptionValue($this->gatewayInformation['foldername'], 'paypal_test');
150
        if ($test_mode == 1) {
151
            return 'https://www.sandbox.paypal.com/cgi-bin/webscr';
152
        } else {
153
            return 'https://www.paypal.com/cgi-bin/webscr';
154
        }
155
    }
156
157
    /**
158
     * Retourne les éléments à ajouter au formulaire en tant que zones cachées
@@ 215-223 (lines=9) @@
212
     *
213
     * @return string L'URL chez Paypal à appeler pour obtenir des informations
214
     */
215
    private function getdialogURL()
216
    {
217
        $test_mode = (int)$this->handlers->h_oledrion_gateways_options->getGatewayOptionValue($this->gatewayInformation['foldername'], 'paypal_test');
218
        if ($test_mode == 1) {
219
            return 'www.sandbox.paypal.com';
220
        } else {
221
            return 'www.paypal.com';
222
        }
223
    }
224
225
    /**
226
     * Dialogue avec la passerelle de paiement pour indiquer l'état de la commande