Code Duplication    Length = 23-23 lines in 2 locations

catalog/includes/modules/payment/sage_pay_form.php 1 location

@@ 585-607 (lines=23) @@
582
      return (is_numeric($number) && isset($this->_error_messages[$number]));
583
    }
584
585
    function sendDebugEmail($response = array()) {
586
      if (tep_not_null(MODULE_PAYMENT_SAGE_PAY_FORM_DEBUG_EMAIL)) {
587
        $email_body = '';
588
589
        if (!empty($response)) {
590
          $email_body .= 'RESPONSE:' . "\n\n" . print_r($response, true) . "\n\n";
591
        }
592
593
        if (!empty($_POST)) {
594
          $email_body .= '$_POST:' . "\n\n" . print_r($_POST, true) . "\n\n";
595
        }
596
597
        if (!empty($_GET)) {
598
          $email_body .= '$_GET:' . "\n\n" . print_r($_GET, true) . "\n\n";
599
        }
600
601
        if (!empty($email_body)) {
602
          $debugEmail = new Mail(MODULE_PAYMENT_SAGE_PAY_FORM_DEBUG_EMAIL, null, STORE_OWNER_EMAIL_ADDRESS, STORE_OWNER, 'Sage Pay Form Debug E-Mail');
603
          $debugEmail->setBody($email_body);
604
          $debugEmail->send();
605
        }
606
      }
607
    }
608
  }
609
610
  function sage_pay_form_clip_text($value) {

catalog/includes/modules/payment/sage_pay_server.php 1 location

@@ 694-716 (lines=23) @@
691
      return -1;
692
    }
693
694
    function sendDebugEmail($response = array()) {
695
      if (tep_not_null(MODULE_PAYMENT_SAGE_PAY_SERVER_DEBUG_EMAIL)) {
696
        $email_body = '';
697
698
        if (!empty($response)) {
699
          $email_body .= 'RESPONSE:' . "\n\n" . print_r($response, true) . "\n\n";
700
        }
701
702
        if (!empty($_POST)) {
703
          $email_body .= '$_POST:' . "\n\n" . print_r($_POST, true) . "\n\n";
704
        }
705
706
        if (!empty($_GET)) {
707
          $email_body .= '$_GET:' . "\n\n" . print_r($_GET, true) . "\n\n";
708
        }
709
710
        if (!empty($email_body)) {
711
          $debugEmail = new Mail(MODULE_PAYMENT_SAGE_PAY_SERVER_DEBUG_EMAIL, null, STORE_OWNER_EMAIL_ADDRESS, STORE_OWNER, 'Sage Pay Server Debug E-Mail');
712
          $debugEmail->setBody($email_body);
713
          $debugEmail->send();
714
        }
715
      }
716
    }
717
  }
718
?>
719