Code Duplication    Length = 3-3 lines in 3 locations

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

@@ 457-459 (lines=3) @@
454
          $params['BillingState'] = tep_get_zone_code($order->billing['country']['id'], $order->billing['zone_id'], '');
455
        }
456
457
        if ($params['DeliveryCountry'] == 'US') {
458
          $params['DeliveryState'] = tep_get_zone_code($order->delivery['country']['id'], $order->delivery['zone_id'], '');
459
        }
460
461
        $contents = array();
462

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

@@ 152-154 (lines=3) @@
149
      $crypt['DeliveryPostCode'] = substr($order->delivery['postcode'], 0, 10);
150
      $crypt['DeliveryCountry'] = $order->delivery['country']['iso_code_2'];
151
152
      if ($crypt['DeliveryCountry'] == 'US') {
153
        $crypt['DeliveryState'] = tep_get_zone_code($order->delivery['country']['id'], $order->delivery['zone_id'], '');
154
      }
155
156
      if (tep_not_null(MODULE_PAYMENT_SAGE_PAY_FORM_VENDOR_EMAIL)) {
157
        $crypt['VendorEMail'] = substr(MODULE_PAYMENT_SAGE_PAY_FORM_VENDOR_EMAIL, 0, 255);

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

@@ 188-190 (lines=3) @@
185
          $params['BillingState'] = tep_get_zone_code($order->billing['country']['id'], $order->billing['zone_id'], '');
186
        }
187
188
        if ($params['DeliveryCountry'] == 'US') {
189
          $params['DeliveryState'] = tep_get_zone_code($order->delivery['country']['id'], $order->delivery['zone_id'], '');
190
        }
191
192
        if ( MODULE_PAYMENT_SAGE_PAY_SERVER_PROFILE_PAGE != 'Normal' ) {
193
          $params['Profile'] = 'LOW';