Code Duplication    Length = 16-16 lines in 2 locations

src/Api.php 2 locations

@@ 202-217 (lines=16) @@
199
     * @param mixed $params
200
     * @return array
201
     */
202
    public function getTransactionData(array $params)
203
    {
204
        $supportedParams = [
205
            // 訂單編號, 由特約商店產生,不可重複,不可 包含【_】字元,英數限用大寫
206
            'ONO' => '',
207
            // 特店代碼
208
            'MID' => $this->options['MID'],
209
        ];
210
211
        $params = array_replace(
212
            $supportedParams,
213
            array_intersect_key($params, $supportedParams)
214
        );
215
216
        return $this->doRequest($params, 'sync');
217
    }
218
219
    /**
220
     * refundTransaction.
@@ 252-267 (lines=16) @@
249
     * @param array $params
250
     * @return array
251
     */
252
    public function cancelTransaction(array $params)
253
    {
254
        $supportedParams = [
255
            // 訂單編號, 由特約商店產生,不可重複,不可 包含【_】字元,英數限用大寫
256
            'ONO' => '',
257
            // 特店代碼
258
            'MID' => $this->options['MID'],
259
        ];
260
261
        $params = array_replace(
262
            $supportedParams,
263
            array_intersect_key($params, $supportedParams)
264
        );
265
266
        return $this->doRequest($params, 'cancel');
267
    }
268
269
    /**
270
     * @param array $params