public function addSpecificPaymentPageParameters(Customweb_Payment_Authorization_IOrderContext $orderContext, array $parameters)
 {
     $this->orderContext = $orderContext;
     $this->addIfValueNotNull($parameters, 'COMPANY', Customweb_Saferpay_Util::removeWrongEscaptedChars($orderContext->getBillingCompanyName()));
     $this->addIfValueNotNull($parameters, 'LEGALFORM', $this->guessLegalForm());
     $this->addIfValueNotNull($parameters, 'GENDER', $this->getGender($orderContext->getBillingGender(), $orderContext->getBillingCompanyName()));
     $parameters['FIRSTNAME'] = Customweb_Saferpay_Util::removeWrongEscaptedChars($orderContext->getBillingFirstName());
     $parameters['LASTNAME'] = Customweb_Saferpay_Util::removeWrongEscaptedChars($orderContext->getBillingLastName());
     $parameters['STREET'] = Customweb_Saferpay_Util::removeWrongEscaptedChars($orderContext->getBillingStreet());
     $parameters['ZIP'] = $orderContext->getBillingPostCode();
     $parameters['CITY'] = Customweb_Saferpay_Util::removeWrongEscaptedChars($orderContext->getBillingCity());
     $parameters['COUNTRY'] = $orderContext->getBillingCountryIsoCode();
     $parameters['EMAIL'] = $orderContext->getCustomerEMailAddress();
     $this->addIfValueNotNull($parameters, 'PHONE', $orderContext->getBillingPhoneNumber());
     if ($orderContext->getBillingDateOfBirth() != null) {
         $this->addIfValueNotNull($parameters, 'DATEOFBIRTH', $orderContext->getBillingDateOfBirth()->format('Ymd'));
     }
     $this->addIfValueNotNull($parameters, 'DELIVERY_GENDER', $this->getGender($orderContext->getShippingGender(), ""));
     $parameters['DELIVERY_FIRSTNAME'] = Customweb_Saferpay_Util::removeWrongEscaptedChars($orderContext->getShippingFirstName());
     $parameters['DELIVERY_LASTNAME'] = Customweb_Saferpay_Util::removeWrongEscaptedChars($orderContext->getShippingLastName());
     $parameters['DELIVERY_STREET'] = Customweb_Saferpay_Util::removeWrongEscaptedChars($orderContext->getShippingStreet());
     $parameters['DELIVERY_ZIP'] = $orderContext->getShippingPostCode();
     $parameters['DELIVERY_CITY'] = Customweb_Saferpay_Util::removeWrongEscaptedChars($orderContext->getShippingCity());
     $parameters['DELIVERY_COUNTRY'] = $orderContext->getShippingCountryIsoCode();
     $this->addIfValueNotNull($parameters, 'DELIVERY_PHONE', $orderContext->getShippingPhoneNumber());
     $parameters['LANGID'] = substr($orderContext->getLanguage(), 0, 2);
     //$parameters['IP'] = Customweb_Saferpay_Util::getClientIpAddress();
     return $parameters;
 }
 protected function getAddressParameters()
 {
     $parameters = array();
     $orderContext = $this->getOrderContext();
     if (!$orderContext->getPaymentMethod()->existsPaymentMethodConfigurationValue('address_mode')) {
         return array();
     }
     $mode = $orderContext->getPaymentMethod()->getPaymentMethodConfigurationValue('address_mode');
     if ($mode === self::SEND_ADDRESS_MODE_DELIVERY) {
         $parameters['ADDRESS'] = strtoupper(self::SEND_ADDRESS_MODE_DELIVERY);
         $parameters['COMPANY'] = Customweb_Saferpay_Util::removeWrongEscaptedChars($orderContext->getShippingCompanyName());
         $parameters['FIRSTNAME'] = Customweb_Saferpay_Util::removeWrongEscaptedChars($orderContext->getShippingFirstName());
         $parameters['LASTNAME'] = Customweb_Saferpay_Util::removeWrongEscaptedChars($orderContext->getShippingLastName());
         $parameters['STREET'] = Customweb_Saferpay_Util::removeWrongEscaptedChars($orderContext->getShippingStreet());
         $parameters['ZIP'] = $orderContext->getShippingPostCode();
         $parameters['CITY'] = Customweb_Saferpay_Util::removeWrongEscaptedChars($orderContext->getShippingCity());
         $parameters['COUNTRY'] = $orderContext->getShippingCountryIsoCode();
         $parameters['EMAIL'] = $orderContext->getCustomerEMailAddress();
     } else {
         if ($mode === self::SEND_ADDRESS_MODE_BILLING) {
             $parameters['ADDRESS'] = strtoupper(self::SEND_ADDRESS_MODE_BILLING);
             $parameters['COMPANY'] = Customweb_Saferpay_Util::removeWrongEscaptedChars($orderContext->getBillingCompanyName());
             $parameters['FIRSTNAME'] = Customweb_Saferpay_Util::removeWrongEscaptedChars($orderContext->getBillingFirstName());
             $parameters['LASTNAME'] = Customweb_Saferpay_Util::removeWrongEscaptedChars($orderContext->getBillingLastName());
             $parameters['STREET'] = Customweb_Saferpay_Util::removeWrongEscaptedChars($orderContext->getBillingStreet());
             $parameters['ZIP'] = $orderContext->getBillingPostCode();
             $parameters['CITY'] = Customweb_Saferpay_Util::removeWrongEscaptedChars($orderContext->getBillingCity());
             $parameters['COUNTRY'] = $orderContext->getBillingCountryIsoCode();
             $parameters['EMAIL'] = $orderContext->getCustomerEMailAddress();
         }
     }
     return $parameters;
 }