echo rawurlencode($item->Moniker); ?> </moniker> <fulladdress><?php echo rawurlencode($item->FullAddress ? "True" : "False"); ?> </fulladdress> </picklistitem> <?php } ?> </picklist> <?php } } elseif ($action == "GetFormattedAddress") { $formattedResult = $qAddress->getFormattedAddress($addLayout, $moniker); ?> <verifylevel>Verified</verifylevel> <dpvstatus><?php echo $formattedResult->sDpvStatus; ?> </dpvstatus> <address> <?php foreach ($formattedResult->atAddressLines as $line) { ?> <line><?php echo rawurlencode($line->Line); ?> </line> <?php
/** * Pick an address from a list * @param integer $answerId If set we are updating an existing answer * @param array $postData */ public function do_pickAddress($answerId, $postData) { if (empty($postData['addressMoniker'])) { throw new \Jazzee\Exception('Tried to do QASAddress::do_pickAddress with no addressMoniker'); } $qas = new \QuickAddress($this->_applicationPage->getPage()->getVar('wsdlAddress')); $address = $qas->getFormattedAddress("Database layout", $postData['addressMoniker']); $arr = $address->atAddressLines; $originalInput = unserialize(base64_decode($postData['originalInput'])); $input = new \Foundation\Form\Input($postData); $input->set('el' . $this->_applicationPage->getPage()->getElementByFixedId(self::FID_ADDRESS1)->getId(), $arr[0]->Line); $input->set('el' . $this->_applicationPage->getPage()->getElementByFixedId(self::FID_ADDRESS2)->getId(), $arr[1]->Line); $input->set('el' . $this->_applicationPage->getPage()->getElementByFixedId(self::FID_ADDRESS3)->getId(), $originalInput->get('address3')); $input->set('el' . $this->_applicationPage->getPage()->getElementByFixedId(self::FID_CITY)->getId(), $arr[3]->Line); $input->set('el' . $this->_applicationPage->getPage()->getElementByFixedId(self::FID_STATE)->getId(), $arr[4]->Line); $input->set('el' . $this->_applicationPage->getPage()->getElementByFixedId(self::FID_POSTALCODE)->getId(), $arr[5]->Line); $input->set('el' . $this->_applicationPage->getPage()->getElementByFixedId(self::FID_COUNTRY)->getId(), $originalInput->get('countryName')); if (!empty($answerId)) { $this->updateAnswer($input, $answerId); $this->_controller->setVar('currentAnswerID', null); } else { $this->newAnswer($input); } }