function loadAndRegisterGateways() { eZPaymentGatewayType::loadAndRegisterBuiltInGateways(); eZPaymentGatewayType::loadAndRegisterExtensionGateways(); }
$accountInfo = $order->attribute('account_information'); $first_name = urlencode($accountInfo['first_name']); $last_name = urlencode($accountInfo['last_name']); $street = urlencode($accountInfo['street2']); $zip = urlencode($accountInfo['zip']); $state = urlencode($accountInfo['state']); $place = urlencode($accountInfo['place']); $image_url = "{$localHost}" . urlencode($paypalINI->variable('PaypalSettings', 'LogoURI')); $background = urlencode($paypalINI->variable('PaypalSettings', 'BackgroundColor')); $pageStyle = urlencode($paypalINI->variable('PaypalSettings', 'PageStyle')); $noNote = urlencode($paypalINI->variable('PaypalSettings', 'NoNote')); $noteLabel = $noNote == 1 ? '' : urlencode($paypalINI->variable('PaypalSettings', 'NoteLabel')); $noShipping = 1; $url = $paypalServer . $requestURI . "?cmd=_ext-enter" . "&redirect_cmd=_xclick" . "&business={$business}" . "&item_name={$itemName}" . "&custom={$orderID}" . "&amount={$amount}" . "¤cy_code={$currency}" . "&first_name={$first_name}" . "&last_name={$last_name}" . "&address1={$street}" . "&zip={$zip}" . "&state={$state}" . "&city={$place}" . "&image_url={$image_url}" . "&cs={$background}" . "&page_style={$pageStyle}" . "&no_shipping={$noShipping}" . "&cn={$noteLabel}" . "&no_note={$noNote}" . "&lc={$countryCode}" . "¬ify_url={$localHost}" . $indexDir . "/paypal/notify_url/" . "&return={$localHost}" . $indexDir . "/shop/checkout/" . "&cancel_return={$localHost}" . $indexDir . "/shop/basket/"; //__DEBUG__ $this->logger->writeTimedString("business = {$business}"); $this->logger->writeTimedString("item_name = {$itemName}"); $this->logger->writeTimedString("custom = {$orderID}"); $this->logger->writeTimedString("no_shipping = {$noShipping}"); $this->logger->writeTimedString("localHost = {$localHost}"); $this->logger->writeTimedString("amount = {$amount}"); $this->logger->writeTimedString("currency_code = {$currency}"); $this->logger->writeTimedString("notify_url = {$localHost}" . $indexDir . "/paypal/notify_url/"); $this->logger->writeTimedString("return = {$localHost}" . $indexDir . "/shop/checkout/"); $this->logger->writeTimedString("cancel_return = {$localHost}" . $indexDir . "/shop/basket/"); //___end____ return $url; } } eZPaymentGatewayType::registerGateway(EZ_PAYMENT_GATEWAY_TYPE_PAYPAL, "ezpaypalgateway", "Paypal");