Code Duplication    Length = 5-7 lines in 2 locations

catalog/includes/modules/payment/paypal_express.php 2 locations

@@ 275-279 (lines=5) @@
272
      }
273
274
      if ( OSCOM_APP_PAYPAL_GATEWAY == '1' ) { // PayPal
275
        if ( !in_array($appPayPalEcResult['ACK'], array('Success', 'SuccessWithWarning')) ) {
276
          tep_redirect(tep_href_link(FILENAME_SHOPPING_CART, 'error_message=' . stripslashes($appPayPalEcResult['L_LONGMESSAGE0']), 'SSL'));
277
        } elseif ( !tep_session_is_registered('appPayPalEcSecret') || ($appPayPalEcResult['PAYMENTREQUEST_0_CUSTOM'] != $appPayPalEcSecret) ) {
278
          tep_redirect(tep_href_link(FILENAME_SHOPPING_CART, '', 'SSL'));
279
        }
280
      } else { // Payflow
281
        if ($appPayPalEcResult['RESULT'] != '0') {
282
          tep_redirect(tep_href_link(FILENAME_SHOPPING_CART, 'error_message=' . urlencode($appPayPalEcResult['OSCOM_ERROR_MESSAGE']), 'SSL'));
@@ 327-333 (lines=7) @@
324
        tep_redirect(tep_href_link('ext/modules/payment/paypal/express.php', '', 'SSL'));
325
      }
326
327
      if ( in_array($appPayPalEcResult['ACK'], array('Success', 'SuccessWithWarning')) ) {
328
        if ( !tep_session_is_registered('appPayPalEcSecret') || ($appPayPalEcResult['PAYMENTREQUEST_0_CUSTOM'] != $appPayPalEcSecret) ) {
329
          tep_redirect(tep_href_link(FILENAME_SHOPPING_CART, '', 'SSL'));
330
        }
331
      } else {
332
        tep_redirect(tep_href_link(FILENAME_SHOPPING_CART, 'error_message=' . stripslashes($appPayPalEcResult['L_LONGMESSAGE0']), 'SSL'));
333
      }
334
335
      if (empty($comments)) {
336
        if (isset($HTTP_POST_VARS['ppecomments']) && tep_not_null($HTTP_POST_VARS['ppecomments'])) {