Code Duplication    Length = 12-12 lines in 2 locations

src/Gateways/Alipay.php 1 location

@@ 330-341 (lines=12) @@
327
     *
328
     * @return Response|Collection
329
     */
330
    protected function makePay($gateway)
331
    {
332
        $app = new $gateway();
333
334
        if ($app instanceof GatewayInterface) {
335
            return $app->pay($this->gateway, array_filter($this->payload, function ($value) {
336
                return $value !== '' && !is_null($value);
337
            }));
338
        }
339
340
        throw new InvalidGatewayException("Pay Gateway [{$gateway}] Must Be An Instance Of GatewayInterface");
341
    }
342
}
343

src/Gateways/Wechat.php 1 location

@@ 364-375 (lines=12) @@
361
     *
362
     * @return Response|Collection
363
     */
364
    protected function makePay($gateway)
365
    {
366
        $app = new $gateway();
367
368
        if ($app instanceof GatewayInterface) {
369
            return $app->pay($this->gateway, array_filter($this->payload, function ($value) {
370
                return $value !== '' && !is_null($value);
371
            }));
372
        }
373
374
        throw new InvalidGatewayException("Pay Gateway [{$gateway}] Must Be An Instance Of GatewayInterface");
375
    }
376
}
377