当前位置: 首页>>代码示例>>PHP>>正文


PHP Address::setCity方法代码示例

本文整理汇总了PHP中Address::setCity方法的典型用法代码示例。如果您正苦于以下问题:PHP Address::setCity方法的具体用法?PHP Address::setCity怎么用?PHP Address::setCity使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Address的用法示例。


在下文中一共展示了Address::setCity方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: testapi

 public function testapi()
 {
     $o_bcpc = new BaseCommerceClient(RENTSQUARE_MERCH_USER, RENTSQUARE_MERCH_PASS, RENTSQUARE_MERCH_KEY);
     $o_bcpc->setSandbox(BC_SANDBOXVALUE);
     $o_address = new Address();
     $o_address->setName(Address::$XS_ADDRESS_NAME_BILLING);
     $o_address->setLine1("123 Some Address");
     $o_address->setCity("Tempe");
     $o_address->setState("AZ");
     $o_address->setZipcode("12345");
     $o_bc = new BankCard();
     $o_bc->setBillingAddress($o_address);
     $o_bc->setExpirationMonth("02");
     $o_bc->setExpirationYear("2015");
     $o_bc->setName("Nick 2");
     $o_bc->setNumber("4111111111111111");
     $o_bc->setToken("myToken12asdfas3");
     $o_bc = $o_bcpc->addBankCard($o_bc);
     if ($o_bc->isStatus(BankCard::$XS_BC_STATUS_FAILED)) {
         //the add Failed, look at messages array for reason(s) why
         //var_dump( $o_bc->getMessages() );
         $this->set('message', $o_bc->getMessages());
     } else {
         if ($o_bc->isStatus(BankCard::$XS_BC_STATUS_ACTIVE)) {
             //Card added successfully
             //var_dump( $o_bc->getToken() );
             $this->set('message', $o_bc->getToken());
         }
     }
 }
开发者ID:veslo1,项目名称:RentSquare,代码行数:30,代码来源:PaymentMethodsController.php

示例2: fromArray

 public static function fromArray($data)
 {
     $address = new Address();
     if (isset($data['street'])) {
         $address->setStreet($data['street']);
     }
     if (isset($data['street2'])) {
         $address->setStreet2($data['street2']);
     }
     if (isset($data['zip'])) {
         $address->setZip($data['zip']);
     }
     if (isset($data['city'])) {
         $address->setCity($data['city']);
     }
     if (isset($data['country'])) {
         $address->setCountry($data['country']);
     }
     if (isset($data['state'])) {
         $address->setState($data['state']);
     }
     if (isset($data['tel'])) {
         $address->setTel($data['tel']);
     }
     if (isset($data['fax'])) {
         $address->setFax($data['fax']);
     }
     if (isset($data['email'])) {
         $address->setEmail($data['email']);
     }
     return $address;
 }
开发者ID:tomaj,项目名称:invoice-client,代码行数:32,代码来源:Address.php

示例3: testLatLongValidation

 function testLatLongValidation()
 {
     $address = new Address();
     $address->setLine1("900 Winslow Way");
     $address->setLine2("Ste 130");
     $address->setCity("Bainbridge Island");
     $address->setRegion("WA");
     $address->setPostalCode("98110");
     $address->setLongitude("-122.510359");
     $address->setLatitude("47.624972");
     $validateRequest = new ValidateRequest();
     $validateRequest->setAddress($address);
     $validateRequest->setTextCase(TextCase::$Upper);
     //added for 4.13 changes
     $validateRequest->setCoordinates(true);
     //Sets Profile name from Configuration File to "Jaas"
     //this will force it to Jaas (PostLocate)
     $this->client = new AddressServiceSoap("JaasDevelopement");
     //validate the Request
     $result = $this->client->validate($validateRequest);
     //Re-Assigning to the original Profile
     $this->client = new AddressServiceSoap("Development");
     $this->assertEqual($result->getResultCode(), SeverityLevel::$Success);
     $validAddresses = $result->getValidAddresses();
     $this->assertEqual(1, count($validAddresses));
     $validAddresses = $result->getValidAddresses();
     if (count($validAddresses) != 1) {
         echo "Unexpected number of addresses returned.  Expected one address.";
     } else {
         $validAddress = $validAddresses[0];
         $this->assertEqual(strtoupper($address->getLine1()) . " E " . strtoupper($address->getLine2()), $validAddress->getLine1());
         $this->assertEqual("", $validAddress->getLine2());
         $this->assertEqual(strtoupper($address->getCity()), $validAddress->getCity());
         $this->assertEqual(strtoupper($address->getRegion()), $validAddress->getRegion());
         $this->assertEqual($address->getPostalCode() . "-2450", $validAddress->getPostalCode());
         $this->assertEqual("H", $validAddress->getAddressType());
         $this->assertEqual("C051", $validAddress->getCarrierRoute());
         //Ticket 21203: Modified Fips Code value for jaas enabled account.
         //$this->assertEqual("5303500000", $validAddress->getFipsCode());
         $this->assertEqual("5303503736", $validAddress->getFipsCode());
         $this->assertEqual("KITSAP", $validAddress->getCounty());
         $this->assertEqual(strtoupper($address->getCity()) . " " . strtoupper($address->getRegion()) . " " . $address->getPostalCode() . "-2450", $validAddress->getLine4());
         $this->assertEqual("981102450307", $validAddress->getPostNet());
         // Added 4.13 changes for the Lat Long
         // Update to check for ZIP+4 precision
         // Zip+4 precision coordinates
         if (strlen($validAddress->getLatitude()) > 7) {
             echo "ZIP+4 precision coordinates received";
             $this->assertEqual($address->getLatitude(), $validAddress->getLatitude());
             $this->assertEqual($address->getLongitude(), $validAddress->getLongitude());
         } else {
             echo "ZIP5 precision coordinates received";
             $this->assertEqual(substr($validAddress->getLatitude(), 0, 4), substr($address->getLatitude(), 0, 4), "Expected Latitude to start with '47.64'");
             $this->assertEqual(substr($validAddress->getLongitude(), 0, 6), substr($address->getLongitude(), 0, 6), "Expected Longitude to start with '-122.53'");
         }
     }
 }
开发者ID:vijaynalawade-avalara,项目名称:AvaTax-SOAP-PHP-SDK,代码行数:57,代码来源:AddressSvcTest.php

示例4: createAddress

function createAddress()
{
    $address = new Address();
    $address->setAddress("Av. Tiradentes");
    $address->setNumber("123");
    $address->setComplement("Ap. 203");
    $address->setNeighborhood("Centro");
    $address->setCity("São Paulo");
    $address->setState(StateEnum::SAO_PAULO);
    $address->setZipCode("17500000");
    return $address;
}
开发者ID:viniciustaveira,项目名称:bcash-php-sdk,代码行数:12,代码来源:Teste.php

示例5: _convertRequestAddress

 /**
  * Sets attributes from the Mage address on the AvaTax Request address.
  *
  * @return $this
  */
 protected function _convertRequestAddress()
 {
     if (!$this->_requestAddress) {
         $this->_requestAddress = new Address();
     }
     $this->_requestAddress->setLine1($this->_mageAddress->getStreet(1));
     $this->_requestAddress->setLine2($this->_mageAddress->getStreet(2));
     $this->_requestAddress->setCity($this->_mageAddress->getCity());
     $this->_requestAddress->setRegion($this->_mageAddress->getRegionCode());
     $this->_requestAddress->setCountry($this->_mageAddress->getCountry());
     $this->_requestAddress->setPostalCode($this->_mageAddress->getPostcode());
     return $this;
 }
开发者ID:shabirm,项目名称:avatax,代码行数:18,代码来源:Address.php

示例6: buildMerchants

 public function buildMerchants($xml)
 {
     $merchants = new Merchants();
     $merchants->setPageOffset((string) $xml->PageOffset);
     $merchants->setTotalCount((string) $xml->TotalCount);
     // merchant
     $merchantArray = array();
     foreach ($xml->Merchant as $merchant) {
         $tmpMerchant = new Merchant();
         $tmpMerchant->setId((string) $merchant->Id);
         $tmpMerchant->setName((string) $merchant->Name);
         $tmpMerchant->setWebsiteUrl((string) $merchant->WebsiteUrl);
         $tmpMerchant->setPhoneNumber((string) $merchant->PhoneNumber);
         $tmpMerchant->setCategory((string) $merchant->Category);
         $tmpLocation = new Location();
         $location = $merchant->Location;
         $tmpLocation->setName((string) $location->Name);
         $tmpLocation->setDistance((string) $location->Distance);
         $tmpLocation->setDistanceUnit((string) $location->DistanceUnit);
         $tmpAddress = new Address();
         $address = $location->Address;
         $tmpAddress->setLine1((string) $address->Line1);
         $tmpAddress->setLine2((string) $address->Line2);
         $tmpAddress->setCity((string) $address->City);
         $tmpAddress->setPostalCode((string) $address->PostCode);
         $tmpCountry = new Country();
         $tmpCountry->setName((string) $address->Country->Name);
         $tmpCountry->setCode((string) $address->Country->Code);
         $tmpCountrySubdivision = new CountrySubdivision();
         $tmpCountrySubdivision->setName((string) $address->CountrySubdivision->Name);
         $tmpCountrySubdivision->setCode((string) $address->CountrySubdivision->Code);
         $tmpAddress->setCountry($tmpCountry);
         $tmpAddress->setCountrySubdivision($tmpCountrySubdivision);
         $tmpPoint = new Point();
         $point = $location->Point;
         $tmpPoint->setLatitude((string) $point->Latitude);
         $tmpPoint->setLongitude((string) $point->Longitude);
         // ACCEPTANCE FRAMEWORK NEEDS LOOKED AT <RETURN XML AND DOC DOES NOT HAVE ALL VALUES>
         //$tmpAcceptance = new Acceptance();
         //$acceptance = $merchant->Acceptance;
         // FEATURES FRAMEWORK NEEDS LOOKED AT <RETURN XML AND DOC DOES NOT HAVE ALL VALUES>
         //$tmpFeatures = new Features();
         //$features =  $merchant->Features;
         $tmpLocation->setPoint($tmpPoint);
         $tmpLocation->setAddress($tmpAddress);
         $tmpMerchant->setLocation($tmpLocation);
         array_push($merchantArray, $tmpMerchant);
     }
     $merchants->setMerchant($merchantArray);
     return $merchants;
 }
开发者ID:vicenteguerra,项目名称:Flashbuy,代码行数:51,代码来源:MerchantLocationService.php

示例7: buildAtms

 public function buildAtms($xml)
 {
     $atms = new Atms();
     $atms->setPageOffset($xml->PageOffset);
     $atms->setTotalCount($xml->TotalCount);
     $atmArray = array();
     foreach ($xml->Atm as $atm) {
         $tmpAtm = new Atm();
         $tmpAtm->setHandicapAccessible((string) $atm->HandicapAccessible);
         $tmpAtm->setCamera((string) $atm->Camera);
         $tmpAtm->setAvailability((string) $atm->Availability);
         $tmpAtm->setAccessFees((string) $atm->AccessFees);
         $tmpAtm->setOwner((string) $atm->Owner);
         $tmpAtm->setSharedDeposit((string) $atm->SharedDeposit);
         $tmpAtm->setSurchargeFreeAlliance((string) $atm->SurchargeFreeAlliance);
         $tmpAtm->setSponsor((string) $atm->Sponsor);
         $tmpAtm->setSupportEMV((string) $atm->SupportEMV);
         $tmpAtm->setSurchargeFreeAllianceNetwork((string) $atm->SurchargeFreeAllianceNetwork);
         $tmpLocation = new Location();
         $location = $atm->Location;
         $tmpLocation->setName((string) $location->Name);
         $tmpLocation->setDistance((string) $location->Distance);
         $tmpLocation->setDistanceUnit((string) $location->DistanceUnit);
         $tmpAddress = new Address();
         $address = $location->Address;
         $tmpAddress->setLine1((string) $address->Line1);
         $tmpAddress->setLine2((string) $address->Line2);
         $tmpAddress->setCity((string) $address->City);
         $tmpAddress->setPostalCode((string) $address->PostCode);
         $tmpCountry = new Country();
         $tmpCountry->setName((string) $address->Country->Name);
         $tmpCountry->setCode((string) $address->Country->Code);
         $tmpCountrySubdivision = new CountrySubdivision();
         $tmpCountrySubdivision->setName((string) $address->CountrySubdivision->Name);
         $tmpCountrySubdivision->setCode((string) $address->CountrySubdivision->Code);
         $tmpAddress->setCountry($tmpCountry);
         $tmpAddress->setCountrySubdivision($tmpCountrySubdivision);
         $tmpPoint = new Point();
         $point = $location->Point;
         $tmpPoint->setLatitude((string) $point->Latitude);
         $tmpPoint->setLongitude((string) $point->Longitude);
         $tmpLocation->setPoint($tmpPoint);
         $tmpLocation->setAddress($tmpAddress);
         $tmpAtm->setLocation($tmpLocation);
         array_push($atmArray, $tmpAtm);
     }
     $atms->setAtm($atmArray);
     return $atms;
 }
开发者ID:vicenteguerra,项目名称:Flashbuy,代码行数:49,代码来源:AtmLocationService.php

示例8: parseForm

 private function parseForm(HTTPRequest $request, Address $address)
 {
     $title = htmlspecialchars($request->postData('title'));
     $address1 = htmlspecialchars($request->postData('address-1'));
     $address2 = htmlspecialchars($request->postData('address-2'));
     $zipCode = htmlspecialchars($request->postData('zip-code'));
     $city = htmlspecialchars($request->postData('city'));
     $country = 'France';
     $address->setTitle($title);
     $address->setAddress1($address1);
     $address->setAddress2($address2);
     $address->setZipCode($zipCode);
     $address->setCity($city);
     $address->setCountry($country);
     $address->setUserId($this->app->user()->getAttribute('id'));
 }
开发者ID:Tipkin-Commons,项目名称:tipkin,代码行数:16,代码来源:AddressesController.class.php

示例9: buildAtms

 public function buildAtms($xml)
 {
     $pageOffset = (string) $xml->PageOffset;
     $totalCount = (string) $xml->TotalCount;
     $restaurantArray = array();
     foreach ($xml->Restaurant as $restaurant) {
         $tmpRestaurant = new Restaurant();
         $tmpRestaurant->setId((string) $restaurant->Id);
         $tmpRestaurant->setName((string) $restaurant->Name);
         $tmpRestaurant->setWebsiteUrl((string) $restaurant->WebsiteUrl);
         $tmpRestaurant->setPhoneNumber((string) $restaurant->PhoneNumber);
         $tmpRestaurant->setCategory((string) $restaurant->Category);
         $tmpRestaurant->setLocalFavoriteInd((string) $restaurant->LocalFavoriteInd);
         $tmpRestaurant->setHiddenGemInd((string) $restaurant->HiddenGemInd);
         $tmpLocation = new Location();
         $location = $restaurant->Location;
         $tmpLocation->setName((string) $location->Name);
         $tmpLocation->setDistance((string) $location->Distance);
         $tmpLocation->setDistanceUnit((string) $location->DistanceUnit);
         $tmpAddress = new Address();
         $address = $location->Address;
         $tmpAddress->setLine1((string) $address->Line1);
         $tmpAddress->setLine2((string) $address->Line2);
         $tmpAddress->setCity((string) $address->City);
         $tmpAddress->setPostalCode((string) $address->PostCode);
         $tmpCountry = new Country();
         $tmpCountry->setName((string) $address->Country->Name);
         $tmpCountry->setCode((string) $address->Country->Code);
         $tmpCountrySubdivision = new CountrySubdivision();
         $tmpCountrySubdivision->setName((string) $address->CountrySubdivision->Name);
         $tmpCountrySubdivision->setCode((string) $address->CountrySubdivision->Code);
         $tmpAddress->setCountry($tmpCountry);
         $tmpAddress->setCountrySubdivision($tmpCountrySubdivision);
         $tmpPoint = new Point();
         $point = $location->Point;
         $tmpPoint->setLatitude((string) $point->Latitude);
         $tmpPoint->setLongitude((string) $point->Longitude);
         $tmpLocation->setPoint($tmpPoint);
         $tmpLocation->setAddress($tmpAddress);
         $tmpRestaurant->setLocation($tmpLocation);
         array_push($restaurantArray, $tmpRestaurant);
     }
     $restaurants = new Restaurants($pageOffset, $totalCount, $restaurantArray);
     return $restaurants;
 }
开发者ID:vicenteguerra,项目名称:Flashbuy,代码行数:45,代码来源:RestaurantsLocalFavoritesService.php

示例10: testPopulateWithPlace

    public function testPopulateWithPlace()
    {
        $point = new Point();
        $point->setLat('-23.59243454');
        $point->setLng('-46.68677054');
        $city = new City();
        $city->setCountry('BR');
        $city->setState('SP');
        $city->setName('São Paulo');
        $category = new Category();
        $category->setId('123');
        $category->setName('Empresas de Internet');
        $address = new Address();
        $address->setStreet("Rua Funchal");
        $address->setNumber(129);
        $address->setComplement('6o andar');
        $address->setCity($city);
        $place = new Place();
        $place->setId("M25GJ288");
        $place->setName("Apontador.com - São Paulo");
        $place->setDescription("Líder em geolocalização no Brasil e uma das 250 maiores empresas de internet do mundo, segundo o AlwaysOn, o Apontador (www.apontador.com) desenvolve e oferece serviços e ferramentas de busca e localização para facilitar o dia a dia dos usuários, além de mostrar a opinião do público para os locais cadastrados em seus sites. Com mais de 10 milhões de visitantes mensais, a empresa inclui o site líder em busca local Apontador (www.apontador.com.br) e o de mapas e rotas MapLink (www.maplink.com.br).");
        $place->setIconUrl("http://localphoto.s3.amazonaws.com/C40372534F143O1437_9896391605729015_l.jpg");
        $place->setPoint($point);
        $place->setCategory($category);
        $place->setAddress($address);
        $this->og->populate($place);
        $rootUrl = \ROOT_URL;
        $testMeta = <<<META
\t<meta property="og:title" content="Apontador.com - São Paulo"/>
\t<meta property="og:description" content="Líder em geolocalização no Brasil e uma das 250 maiores empresas de internet do mundo, segundo o AlwaysOn, o Apontador (www.apontador.com) desenvolve e oferece serviços e ferramentas de busca e localização para facilitar o dia a dia dos usuários, além de mostrar a opinião do público para os locais cadastrados em seus sites. Com mais de 10 milhões de visitantes mensais, a empresa inclui o site líder em busca local Apontador (www.apontador.com.br) e o de mapas e rotas MapLink (www.maplink.com.br)."/>
\t<meta property="og:image" content="http://maplink.com.br/widget?v=4.1&lat=-23.59243454&lng=-46.68677054"/>
\t<meta property="og:url" content="{$rootUrl}sp/s-o-paulo/empresas-de-internet/apontador-com-s-o-paulo/M25GJ288.html"/>
\t<meta property="og:street-address" content="Rua Funchal, 129"/>
\t<meta property="og:locality" content="São Paulo"/>
\t<meta property="og:region" content="SP"/>
\t<meta property="og:country-name" content="Brasil"/>
\t<meta property="og:latitude" content="-23.59243454"/>
\t<meta property="og:longitude" content="-46.68677054"/>
\t<meta property="og:type" content="company"/>

META;
        $this->assertEquals($testMeta, $this->og->getMeta());
        $testArray = array('title' => 'Apontador.com - São Paulo', 'description' => 'Líder em geolocalização no Brasil e uma das 250 maiores empresas de internet do mundo, segundo o AlwaysOn, o Apontador (www.apontador.com) desenvolve e oferece serviços e ferramentas de busca e localização para facilitar o dia a dia dos usuários, além de mostrar a opinião do público para os locais cadastrados em seus sites. Com mais de 10 milhões de visitantes mensais, a empresa inclui o site líder em busca local Apontador (www.apontador.com.br) e o de mapas e rotas MapLink (www.maplink.com.br).', 'image' => 'http://maplink.apontador.com.br/widget?v=4.1&lat=-23.59243454&lng=-46.68677054', 'url' => ROOT_URL . 'sp/s-o-paulo/empresas-de-internet/apontador-com-s-o-paulo/M25GJ288.html', 'street-address' => 'Rua Funchal, 129', 'locality' => 'São Paulo', 'region' => 'SP', 'country-name' => 'Brasil', 'latitude' => '-23.59243454', 'longitude' => '-46.68677054', 'type' => 'company');
        $this->assertEquals($testArray, $this->og->getArray());
    }
开发者ID:EHER,项目名称:chegamos,代码行数:45,代码来源:OpenGraphTest.php

示例11: buildMerchantIds

 public function buildMerchantIds($xml)
 {
     $merchantArray = array();
     foreach ($xml->ReturnedMerchants->Merchant as $merchant) {
         $xmlAddress = $merchant->Address;
         $xmlCountrySubdivision = $merchant->Address->CountrySubdivision;
         $xmlCountry = $merchant->Address->Country;
         $xmlMerchant = $merchant;
         $address = new Address();
         $address->setLine1((string) $xmlAddress->Line1);
         $address->setLine2((string) $xmlAddress->Line2);
         $address->setCity((string) $xmlAddress->City);
         $address->setPostalCode((string) $xmlAddress->PostalCode);
         $countrySubdivision = new CountrySubdivision();
         $countrySubdivision->setCode((string) $xmlCountrySubdivision->Code);
         $countrySubdivision->setName((string) $xmlCountrySubdivision->Name);
         $country = new Country();
         $country->setCode((string) $xmlCountry->Code);
         $country->setName((string) $xmlCountry->Name);
         $address->setCountrySubdivision($countrySubdivision);
         $address->setCountry($country);
         $tmpMerchant = new Merchant();
         $tmpMerchant->setAddress($address);
         $tmpMerchant->setPhoneNumber((string) $xmlMerchant->PhoneNumber);
         $tmpMerchant->setBrandName((string) $xmlMerchant->BrandName);
         $tmpMerchant->setMerchantCategory((string) $xmlMerchant->MerchantCategory);
         $tmpMerchant->setMerchantDbaName((string) $xmlMerchant->MerchantDbaName);
         $tmpMerchant->setDescriptorText((string) $xmlMerchant->DescriptorText);
         $tmpMerchant->setLegalCorporateName((string) $xmlMerchant->LegalCorporateName);
         $tmpMerchant->setBrickCount((string) $xmlMerchant->BrickCount);
         $tmpMerchant->setComment((string) $xmlMerchant->Comment);
         $tmpMerchant->setLocationId((string) $xmlMerchant->LocationId);
         $tmpMerchant->setOnlineCount((string) $xmlMerchant->OnlineCount);
         $tmpMerchant->setOtherCount((string) $xmlMerchant->OtherCount);
         $tmpMerchant->setSoleProprietorName((string) $xmlMerchant->SoleProprietorName);
         array_push($merchantArray, $tmpMerchant);
     }
     $returnedMerchants = new ReturnedMerchants();
     $returnedMerchants->setMerchant($merchantArray);
     $merchantIds = new MerchantIds();
     $merchantIds->setReturnedMerchants($returnedMerchants);
     $merchantIds->setMessage($xml->Message);
     return $merchantIds;
 }
开发者ID:vicenteguerra,项目名称:Flashbuy,代码行数:44,代码来源:MerchantIdentifierService.php

示例12: create_ecp_PaymentMethod

function create_ecp_PaymentMethod()
{
    $uniqueValue = get_unique_value();
    $merchantAccountId = 'account-' . $uniqueValue;
    $merchantPaymentMethodId = 'pm-' . $uniqueValue;
    $email = get_unique_value() . '@nomail.com';
    $successUrl = 'http://good.com/';
    //need a trailing slash
    $errorUrl = 'http://bad.com/';
    //need a trailing slash
    $name = 'John Vindicia';
    $addr1 = '303 Twin Dolphin Drive';
    $city = 'Redwood City';
    $district = 'CA';
    $postalCode = '94065';
    $country = 'US';
    $address = new Address();
    $address->setName($name);
    $address->setAddr1($addr1);
    $address->setCity($city);
    $address->setDistrict($district);
    $address->setPostalCode($postalCode);
    $address->setCountry($country);
    $paymentmethod = new PaymentMethod();
    $paymentmethod->setType('ECP');
    $paymentmethod->setAccountHolderName($name);
    $paymentmethod->setBillingAddress($address);
    $paymentmethod->setMerchantPaymentMethodId($merchantPaymentMethodId);
    $paymentmethod->setCurrency('USD');
    $ecp = new ECP();
    $ecp->setAccount('495958930');
    $ecp->setRoutingNumber('611111111');
    $ecp->setAllowedTransactionType('Inbound');
    $ecp->setAccountType('ConsumerChecking');
    $paymentmethod->setECP($ecp);
    $account = new Account();
    $account->setMerchantAccountId($merchantAccountId);
    $account->setEmailAddress($email);
    $account->setShippingAddress($address);
    $account->setEmailTypePreference('html');
    $account->setName($name);
    $account->setPaymentMethods(array($paymentmethod));
    return $account;
}
开发者ID:sheller-vin,项目名称:CashBoxAPISamples,代码行数:44,代码来源:ecpAutoBill.php

示例13: create_paypal_PaymentMethod

function create_paypal_PaymentMethod()
{
    $uniqueValue = get_unique_value();
    $merchantAccountId = 'account-' . $uniqueValue;
    $merchantPaymentMethodId = 'pm-' . $uniqueValue;
    $email = get_unique_value() . '@nomail.com';
    $successUrl = 'http://good.com/';
    //need a trailing slash
    $errorUrl = 'http://bad.com/';
    //need a trailing slash
    $name = 'John Vindicia';
    $addr1 = '303 Twin Dolphin Drive';
    $city = 'Redwood City';
    $district = 'CA';
    $postalCode = '94065';
    $country = 'US';
    $address = new Address();
    $address->setName($name);
    $address->setAddr1($addr1);
    $address->setCity($city);
    $address->setDistrict($district);
    $address->setPostalCode($postalCode);
    $address->setCountry($country);
    $paymentmethod = new PaymentMethod();
    $paymentmethod->setType('PayPal');
    $paymentmethod->setAccountHolderName($name);
    $paymentmethod->setBillingAddress($address);
    $paymentmethod->setMerchantPaymentMethodId($merchantPaymentMethodId);
    $paymentmethod->setCurrency('USD');
    $paypal = new PayPal();
    $paypal->setReturnUrl($successUrl);
    $paypal->setCancelUrl($errorUrl);
    $paymentmethod->setPaypal($paypal);
    $account = new Account();
    $account->setMerchantAccountId($merchantAccountId);
    $account->setEmailAddress($email);
    $account->setShippingAddress($address);
    $account->setEmailTypePreference('html');
    $account->setName($name);
    //$account->setPaymentMethods(array($paymentmethod));
    //return $account;
    return array('account' => $account, 'paymentmethod' => $paymentmethod);
}
开发者ID:sheller-vin,项目名称:CashBoxAPISamples,代码行数:43,代码来源:paypalAutoBill.php

示例14: testPopulateWithPlace

    public function testPopulateWithPlace()
    {
        $point = new Point();
        $point->setLat('-23.59243454');
        $point->setLng('-46.68677054');
        $city = new City();
        $city->setCountry('BR');
        $city->setState('SP');
        $city->setName('São Paulo');
        $category = new Category();
        $category->setId('067');
        $category->setName('Restaurante');
        $address = new Address();
        $address->setStreet("R. Min. Jesuino Cardoso");
        $address->setNumber(473);
        $address->setCity($city);
        $place = new Place();
        $place->setId("UCV34B2P");
        $place->setName("Uziel Restaurante");
        $place->setDescription("Se você procura um restaurante com variedade, qualidade com preço justo você encontra no Uziel restaurante!O preço do kilo é R\$ 26,90, mas você paga no máximo R\$ 15,90 por pesagem de refeições (excluindo sobremesas, bebidas e doces). Acima de 500 gramas você ainda ganha um refrescoUm bom vinho, gelatina e cafezinho são por nossa conta.Se precisar de internet você pode contar com nossa rede Wi-Fi.Nosso cardápio diário possui 5 tipos de carne todos os dias, feijoada completa e separada (feijão e carnes) às quartas, 6 tipos de massa nas quintas e 4 tipos de pizzas nassextas, além de opções de peixes todas as terças e sextas.Oferecemos convênio com descontos progressivos para empresas e um bolo com o sabor a escolha do aniversariante, caso agende com antecedência e traga mais de 10 pessoas para almoçar no seu aniversário.Aceitamos todos os cartões de crédito e vales refeição.Você pode receber nosso cardápio atualizado diariamente pelo twitter http://twitter.com/uzielrestaurant");
        $place->setIconUrl("http://maplink.com.br/widget?v=4.1&lat=-23.5926083&lng=-46.6818329");
        $place->setPoint($point);
        $place->setCategory($category);
        $place->setAddress($address);
        $this->abm->populate($place);
        $rootUrl = \ROOT_URL;
        $testMeta = <<<META
\t<meta property="restaurant:title" content="Uziel Restaurante"/>
\t<meta property="restaurant:description" content="Se você procura um restaurante com variedade, qualidade com preço justo você encontra no Uziel restaurante!O preço do kilo é R\$ 26,90, mas você paga no máximo R\$ 15,90 por pesagem de refeições (excluindo sobremesas, bebidas e doces). Acima de 500 gramas você ainda ganha um refrescoUm bom vinho, gelatina e cafezinho são por nossa conta.Se precisar de internet você pode contar com nossa rede Wi-Fi.Nosso cardápio diário possui 5 tipos de carne todos os dias, feijoada completa e separada (feijão e carnes) às quartas, 6 tipos de massa nas quintas e 4 tipos de pizzas nassextas, além de opções de peixes todas as terças e sextas.Oferecemos convênio com descontos progressivos para empresas e um bolo com o sabor a escolha do aniversariante, caso agende com antecedência e traga mais de 10 pessoas para almoçar no seu aniversário.Aceitamos todos os cartões de crédito e vales refeição.Você pode receber nosso cardápio atualizado diariamente pelo twitter http://twitter.com/uzielrestaurant"/>
\t<meta property="restaurant:image" content="http://maplink.apontador.com.br/widget?v=4.1&lat=-23.59243454&lng=-46.68677054"/>
\t<meta property="restaurant:url" content="{$rootUrl}sp/s-o-paulo/restaurante/uziel-restaurante/UCV34B2P.html"/>
\t<meta property="restaurant:address" content="R. Min. Jesuino Cardoso, 473"/>
\t<meta property="restaurant:city" content="São Paulo"/>
\t<meta property="restaurant:state" content="SP"/>
\t<meta property="restaurant:country-name" content="Brasil"/>
\t<meta property="restaurant:type" content="restaurant"/>

META;
        $this->assertEquals($testMeta, $this->abm->getMeta());
        $testArray = array('title' => 'Uziel Restaurante', 'description' => 'Se você procura um restaurante com variedade, qualidade com preço justo você encontra no Uziel restaurante!O preço do kilo é R$ 26,90, mas você paga no máximo R$ 15,90 por pesagem de refeições (excluindo sobremesas, bebidas e doces). Acima de 500 gramas você ainda ganha um refrescoUm bom vinho, gelatina e cafezinho são por nossa conta.Se precisar de internet você pode contar com nossa rede Wi-Fi.Nosso cardápio diário possui 5 tipos de carne todos os dias, feijoada completa e separada (feijão e carnes) às quartas, 6 tipos de massa nas quintas e 4 tipos de pizzas nassextas, além de opções de peixes todas as terças e sextas.Oferecemos convênio com descontos progressivos para empresas e um bolo com o sabor a escolha do aniversariante, caso agende com antecedência e traga mais de 10 pessoas para almoçar no seu aniversário.Aceitamos todos os cartões de crédito e vales refeição.Você pode receber nosso cardápio atualizado diariamente pelo twitter http://twitter.com/uzielrestaurant', 'image' => 'http://maplink.apontador.com.br/widget?v=4.1&lat=-23.59243454&lng=-46.68677054', 'url' => ROOT_URL . 'sp/s-o-paulo/restaurante/uziel-restaurante/UCV34B2P.html', 'address' => 'R. Min. Jesuino Cardoso, 473', 'city' => 'São Paulo', 'state' => 'SP', 'country-name' => 'Brasil', 'type' => 'restaurant');
        $this->assertEquals($testArray, $this->abm->getArray());
    }
开发者ID:EHER,项目名称:chegamos,代码行数:42,代码来源:ABMetaTest.php

示例15: setShippingAddress

 /**
  * @param Address $address
  * @return boolean
  */
 public function setShippingAddress($shippingAddress)
 {
     $bool = $this->shippingAddress->setStreetAddress($shippingAddress->getStreetAddress());
     if (!$bool) {
         return FALSE;
     }
     $bool = $this->shippingAddress->setCity($shippingAddress->getCity());
     if (!$bool) {
         return FALSE;
     }
     $bool = $this->shippingAddress->setParish($shippingAddress->getParish());
     if (!$bool) {
         return FALSE;
     }
     $bool = $this->shippingAddress->setPostalCode($shippingAddress->getPostalCode());
     if (!$bool) {
         return FALSE;
     }
     return TRUE;
 }
开发者ID:keniel123,项目名称:comp2140,代码行数:24,代码来源:Account.php


注:本文中的Address::setCity方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。