Code Duplication    Length = 12-12 lines in 2 locations

src/Gateways/Wechat.php 1 location

@@ 72-83 (lines=12) @@
69
     *
70
     * @return Response|Collection
71
     */
72
    public function pay($gateway, $params = [])
73
    {
74
        $this->payload = array_merge($this->payload, $params);
75
76
        $gateway = get_class($this).'\\'.Str::studly($gateway).'Gateway';
77
78
        if (class_exists($gateway)) {
79
            return $this->makePay($gateway);
80
        }
81
82
        throw new GatewayException("Pay Gateway [{$gateway}] Not Exists", 1);
83
    }
84
85
    /**
86
     * Verify data.

src/Gateways/Alipay.php 1 location

@@ 77-88 (lines=12) @@
74
     *
75
     * @return Response|Collection
76
     */
77
    public function pay($gateway, $params = [])
78
    {
79
        $this->payload['biz_content'] = json_encode($params);
80
81
        $gateway = get_class($this).'\\'.Str::studly($gateway).'Gateway';
82
83
        if (class_exists($gateway)) {
84
            return $this->makePay($gateway);
85
        }
86
87
        throw new GatewayException("Pay Gateway [{$gateway}] not exists", 1);
88
    }
89
90
    /**
91
     * Verfiy sign.