Code Duplication    Length = 7-7 lines in 2 locations

code/EwayPayment.php 2 locations

@@ 216-222 (lines=7) @@
213
214
        // 2) Main Settings
215
216
        if ($this->config()->get('test_mode') == 'yes') {
217
            $inputs['CustomerID'] = $this->config()->get('test_customer_id');
218
            $inputs['UserName'] = $this->config()->get('test_customer_username');
219
        } else {
220
            $inputs['CustomerID'] = $this->config()->get('customer_id');
221
            $inputs['UserName'] = $this->config()->get('customer_username');
222
        }
223
        if ($this->config()->get('test_mode') == 'yes' && isset($_REQUEST["PaymentTypeTest"])) {
224
            $amount = round($this->Amount->getAmount())+(intval($_REQUEST["PaymentTypeTest"])/100);
225
        } else {
@@ 287-293 (lines=7) @@
284
    public function EwayConfirmationURL($code)
285
    {
286
        $inputs = array('AccessPaymentCode' => $code);
287
        if ($this->config()->get('test_mode') == 'yes') {
288
            $inputs['CustomerID'] = $this->config()->get('test_customer_id');
289
            $inputs['UserName'] = $this->config()->get('test_customer_username');
290
        } else {
291
            $inputs['CustomerID'] = $this->config()->get('customer_id');
292
            $inputs['UserName'] = $this->config()->get('customer_username');
293
        }
294
        return $this->config()->get('confirmation_url') . '?' . http_build_query($inputs);
295
    }
296