使用PayPal Pro而不是PayPal Express-Omnipay for Laravel


Use Paypal Pro instead of Paypal Express - Omnipay for Laravel

我有一个购物车,目前正在将用户重定向到直接PayPal进行付款。我想允许客户在网站上输入他们的信用卡并PayPal处理它。我有PayPal专业帐户,但我在使用它时遇到问题。我不确定如何通过Omnipay使用PayPal Pro软件包。在我的vendors文件夹中,我有一个ExpressGateway.php和一个Progateway.php,但不确定如何调用Progateway.php页面。我可以看到设置它的唯一方法是使用我目前为快递所做的Omnipay::getway('paypal')。我需要使用什么流程才能使用 PayPal Pro?

        $gateway = Omnipay::gateway('paypal');
        if(Auth::user() != NULL && Auth::user()->super_user == 1) {
            //sandbox
            $gateway->setUsername('#######');
            $gateway->setPassword('#######');
            $gateway->setSignature('#######');
            $gateway->setTestMode('true');
        } else {
            //production
            $gateway->setUsername('#######');
            $gateway->setPassword('#######');
            $gateway->setSignature('######');
        }
        $cardInput = array(
            'firstName' => $info['first_name_bill'],
            'lastName' => $info['last_name_bill'],
            'billingAddress1' => $info['street_address_1_bill'],
            'billingAddress2' => $info['street_address_2_bill'],
            'billingPhone' => $info['phone_bill'],
            'billingCity' => $info['city_bill'],
            'billingState' => $info['state_bill'],
            'billingPostCode' => $info['zip_bill'],
            'shippingAddress1' => $info['street_address_1_ship'],
            'shippingAddress2' => $info['street_address_2_ship'],
            'shippingPhone' => $info['phone_ship'],
            'shippingCity' => $info['city_ship'],
            'shippingState' => $info['state_ship'],
            'shippingPostCode' => $info['zip_ship'],
        );
        $card = Omnipay::creditCard($cardInput);
        $response = Omnipay::purchase(
            array(
                'cancelUrl' => URL::to('cart'),
                'returnUrl' => URL::action('CartController@getSuccessPayment', array('id' =>$invoice->id)),
                'amount' => Input::get('total'),
                'currency' => 'USD',
                'card' => $card,
                'description' => '#####'
            )
        )->send();`

以这种方式设置网关:

$gateway = Omnipay::gateway('Paypal_Pro');