Example #1
0
 protected function doNoAction()
 {
     $endpoint = \XLite\Core\Request::getInstance()->endpoint;
     switch ($endpoint) {
         case "connect":
             return $this->doActionConnect();
             break;
     }
     $network = \XLite\Core\Request::getInstance()->network;
     if ('testnet' !== $network && 'livenet' !== $network) {
         return;
     }
     $method_id = \XLite\Core\Request::getInstance()->method_id;
     $method = $this->getPaymentMethod($method_id);
     $redirect_url = \XLite\Core\Request::getInstance()->redirecturl;
     $bitpayWrapper = new XcartWrapper($method);
     $bitpayWrapper->setNetwork($network);
     $url = $bitpayWrapper->getPairingUrl();
     $redirect_url = "&redirect=" . urlencode($redirect_url);
     $url = $url . $redirect_url;
     \XLite\Core\Event::generatedConnectUrl(array($url));
 }