Code Duplication    Length = 12-12 lines in 2 locations

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

src/Gateways/Alipay.php 1 location

@@ 352-363 (lines=12) @@
349
     *
350
     * @return Response|Collection
351
     */
352
    protected function makePay($gateway)
353
    {
354
        $app = new $gateway();
355
356
        if ($app instanceof GatewayInterface) {
357
            return $app->pay($this->gateway, array_filter($this->payload, function ($value) {
358
                return $value !== '' && !is_null($value);
359
            }));
360
        }
361
362
        throw new InvalidGatewayException("Pay Gateway [{$gateway}] Must Be An Instance Of GatewayInterface");
363
    }
364
}
365