Elcodi\Plugin\PaypalWebCheckoutBundle\EventListener\PaymentCollectEventListener::addPaypalPaymentMethod PHP Method

addPaypalPaymentMethod() public method

Add PayPal payment method
public addPaypalPaymentMethod ( Elcodi\Component\Payment\Event\PaymentCollectionEvent $event )
$event Elcodi\Component\Payment\Event\PaymentCollectionEvent Event
    public function addPaypalPaymentMethod(PaymentCollectionEvent $event)
    {
        if ($this->plugin->isUsable(['business'])) {
            $paypal = new PaymentMethod($this->plugin->getHash(), 'elcodi_plugin.paypal_web_checkout.name', 'elcodi_plugin.paypal_web_checkout.description', $this->router->generate('paymentsuite_paypal_web_checkout_execute'));
            $event->addPaymentMethod($paypal);
        }
    }
PaymentCollectEventListener