Code Duplication    Length = 13-15 lines in 2 locations

catalog/includes/apps/paypal/hooks/admin/orders/action.php 1 location

@@ 173-185 (lines=13) @@
170
        }
171
      }
172
173
      if ( !empty($result) ) {
174
        $sql_data_array = array('orders_id' => (int)$order['orders_id'],
175
                                'orders_status_id' => OSCOM_APP_PAYPAL_TRANSACTIONS_ORDER_STATUS_ID,
176
                                'date_added' => 'now()',
177
                                'customer_notified' => '0',
178
                                'comments' => $result);
179
180
        tep_db_perform(TABLE_ORDERS_STATUS_HISTORY, $sql_data_array);
181
182
        $messageStack->add_session($this->_app->getDef('ms_success_getTransactionDetails'), 'success');
183
      } else {
184
        $messageStack->add_session($this->_app->getDef('ms_error_getTransactionDetails'), 'error');
185
      }
186
    }
187
188
    function doCapture($comments, $order) {

catalog/includes/apps/braintree/hooks/admin/orders/action.php 1 location

@@ 124-138 (lines=15) @@
121
        }
122
      }
123
124
      if (!empty($result)) {
125
        $sql_data_array = array(
126
          'orders_id' => (int)$order['orders_id'],
127
          'orders_status_id' => OSCOM_APP_PAYPAL_BRAINTREE_TRANSACTIONS_ORDER_STATUS_ID,
128
          'date_added' => 'now()',
129
          'customer_notified' => '0',
130
          'comments' => $result
131
        );
132
133
        tep_db_perform('orders_status_history', $sql_data_array);
134
135
        $messageStack->add_session($this->_app->getDef('ms_success_getTransactionDetails'), 'success');
136
      } else {
137
        $messageStack->add_session($this->_app->getDef('ms_error_getTransactionDetails'), 'error');
138
      }
139
    }
140
141
    function doCapture($comments, $order) {