Code Duplication    Length = 11-11 lines in 2 locations

sdk/AllPay.Payment.Integration.php 2 locations

@@ 1266-1276 (lines=11) @@
1263
            }
1264
        }
1265
        // 客戶名稱CustomerName(UrlEncode, 預設為空字串)
1266
        if (! array_key_exists('CustomerName', $arExtend)) {
1267
            $arExtend['CustomerName'] = '';
1268
        } else {
1269
            if (mb_strlen($arExtend['CustomerName'], 'UTF-8') > 20) {
1270
                array_push($arErrors, 'CustomerName max length as 20.');
1271
            }
1272
            // 列印註記為列印(Yes)時,此參數不可為空字串
1273
            if ($arExtend['Print'] == PrintMark::Yes && strlen($arExtend['CustomerName']) == 0) {
1274
                array_push($arErrors, 'CustomerName is required.');
1275
            }
1276
        }
1277
1278
        // 客戶地址CustomerAddr(UrlEncode, 預設為空字串)
1279
        if (! array_key_exists('CustomerAddr', $arExtend)) {
@@ 1279-1289 (lines=11) @@
1276
        }
1277
1278
        // 客戶地址CustomerAddr(UrlEncode, 預設為空字串)
1279
        if (! array_key_exists('CustomerAddr', $arExtend)) {
1280
            $arExtend['CustomerAddr'] = '';
1281
        } else {
1282
            if (mb_strlen($arExtend['CustomerAddr'], 'UTF-8') > 200) {
1283
                array_push($arErrors, 'CustomerAddr max length as 200.');
1284
            }
1285
            // 列印註記為列印(Yes)時,此參數不可為空字串
1286
            if ($arExtend['Print'] == PrintMark::Yes && strlen($arExtend['CustomerAddr']) == 0) {
1287
                array_push($arErrors, 'CustomerAddr is required.');
1288
            }
1289
        }
1290
        // 客戶電話CustomerPhone
1291
        if (! array_key_exists('CustomerPhone', $arExtend)) {
1292
            $arExtend['CustomerPhone'] = '';