Code Duplication    Length = 7-7 lines in 2 locations

catalog/includes/apps/braintree/OSCOM_Braintree.php 1 location

@@ 215-221 (lines=7) @@
212
      return true;
213
    }
214
215
    function getApiCredentials($server, $type) {
216
      if ( ($server == 'live') && defined('OSCOM_APP_PAYPAL_BRAINTREE_LIVE_API_' . strtoupper($type)) ) {
217
        return constant('OSCOM_APP_PAYPAL_BRAINTREE_LIVE_API_' . strtoupper($type));
218
      } elseif ( defined('OSCOM_APP_PAYPAL_BRAINTREE_SANDBOX_API_' . strtoupper($type)) ) {
219
        return constant('OSCOM_APP_PAYPAL_BRAINTREE_SANDBOX_API_' . strtoupper($type));
220
      }
221
    }
222
223
    function getParameters($module) {
224
      $result = array();

catalog/includes/apps/paypal/OSCOM_PayPal.php 1 location

@@ 259-265 (lines=7) @@
256
      return true;
257
    }
258
259
    function getApiCredentials($server, $type) {
260
      if ( ($server == 'live') && defined('OSCOM_APP_PAYPAL_LIVE_API_' . strtoupper($type)) ) {
261
        return constant('OSCOM_APP_PAYPAL_LIVE_API_' . strtoupper($type));
262
      } elseif ( defined('OSCOM_APP_PAYPAL_SANDBOX_API_' . strtoupper($type)) ) {
263
        return constant('OSCOM_APP_PAYPAL_SANDBOX_API_' . strtoupper($type));
264
      }
265
    }
266
267
    function getParameters($module) {
268
      $result = array();