private function getURL(MerchantLocationRequestOptions $options)
 {
     $url = "";
     if ($this->environment == Environment::PRODUCTION) {
         $url = $this->PRODUCTION_URL;
     } else {
         $url = $this->SANDBOX_URL;
     }
     $url = URLUtil::addQueryParameter($url, "Details", $options->getDetails());
     $url = URLUtil::addQueryParameter($url, "PageOffset", $options->getPageOffset());
     $url = URLUtil::addQueryParameter($url, "PageLength", $options->getPageLength());
     $url = URLUtil::addQueryParameter($url, "Category", $options->getCategory());
     $url = URLUtil::addQueryParameter($url, "AddressLine1", $options->getAddressLine1());
     $url = URLUtil::addQueryParameter($url, "AddressLine2", $options->getAddressLine2());
     $url = URLUtil::addQueryParameter($url, "City", $options->getCity());
     $url = URLUtil::addQueryParameter($url, "CountrySubdivision", $options->getCountrySubdivision());
     $url = URLUtil::addQueryParameter($url, "PostalCode", $options->getPostalCode());
     $url = URLUtil::addQueryParameter($url, "Country", $options->getCountry());
     $url = URLUtil::addQueryParameter($url, "Latitude", $options->getLatitude());
     $url = URLUtil::addQueryParameter($url, "Longitude", $options->getLongitude());
     $url = URLUtil::addQueryParameter($url, "DistanceUnit", $options->getDistanceUnit());
     $url = URLUtil::addQueryParameter($url, "Radius", $options->getRadius());
     $url = URLUtil::addQueryParameter($url, "OfferMerchantId", $options->getMerchantId());
     $url = URLUtil::addQueryParameter($url, "InternationalMaestroAccepted", $options->getInternationalMaestroAccepted());
     return $url;
 }
 private function getURL(CountrySubdivisionAtmLocationRequestOptions $options)
 {
     $url = "";
     if ($this->environment == Environment::PRODUCTION) {
         $url = $this->PRODUCTION_URL;
     } else {
         $url = $this->SANDBOX_URL;
     }
     $url = URLUtil::addQueryParameter($url, "Country", $options->getCountry());
     return $url;
 }
 private function getURL(CountryMerchantLocationRequestOptions $options)
 {
     $url = "";
     if ($this->environment == Environment::PRODUCTION) {
         $url = $this->PRODUCTION_URL;
     } else {
         $url = $this->SANDBOX_URL;
     }
     $url = URLUtil::addQueryParameter($url, "Details", $options->getDetails());
     return $url;
 }
 private function getURL(MerchantIdentifierRequestOptions $options)
 {
     $url = "";
     if ($this->environment == Environment::PRODUCTION) {
         $url = $this->PRODUCTION_URL;
     } else {
         $url = $this->SANDBOX_URL;
     }
     $url = URLUtil::addQueryParameter($url, "MerchantId", $options->getMerchantId());
     $url = URLUtil::addQueryParameter($url, "Type", $options->getType());
     return $url;
 }
 private function getURL($offset, $pageLength)
 {
     $url = null;
     if ($this->environment == Environment::PRODUCTION) {
         $url = TerminationInquiryService::PRODUCTION_URL;
     } else {
         $url = TerminationInquiryService::SANDBOX_URL;
     }
     $url = URLUtil::addQueryParameter($url, "PageOffset", $offset);
     $url = URLUtil::addQueryParameter($url, "PageLength", $pageLength);
     return $url;
 }
 private function getURL($offset, $pageLength, $acquireId, $inquiryReferenceNumber)
 {
     $url = null;
     if ($this->environment == Environment::PRODUCTION) {
         $url = TerminationInquiryHistoryService::PRODUCTION_URL;
     } else {
         $url = TerminationInquiryHistoryService::SANDBOX_URL;
     }
     $url = sprintf($url, $inquiryReferenceNumber);
     $url = URLUtil::addQueryParameter($url, "PageOffset", $offset);
     $url = URLUtil::addQueryParameter($url, "PageLength", $pageLength);
     $url = URLUtil::addQueryParameter($url, "AcquirerId", $acquireId);
     return $url;
 }
 private function getURL(RestaurantsLocalFavoritesRequestOptions $options)
 {
     $url = "";
     if ($this->environment == Environment::PRODUCTION) {
         $url = $this->PRODUCTION_URL;
     } else {
         $url = $this->SANDBOX_URL;
     }
     $url = URLUtil::addQueryParameter($url, "PageLength", $options->getPageLength());
     $url = URLUtil::addQueryParameter($url, "PageOffset", $options->getPageOffset());
     $url = URLUtil::addQueryParameter($url, "AddressLine1", $options->getAddressLine1());
     $url = URLUtil::addQueryParameter($url, "AddressLine2", $options->getAddressLine2());
     $url = URLUtil::addQueryParameter($url, "City", $options->getCity());
     $url = URLUtil::addQueryParameter($url, "CountrySubdivision", $options->getCountrySubdivision());
     $url = URLUtil::addQueryParameter($url, "PostalCode", $options->getPostalCode());
     $url = URLUtil::addQueryParameter($url, "Country", $options->getCountry());
     $url = URLUtil::addQueryParameter($url, "Latitude", $options->getLatitude());
     $url = URLUtil::addQueryParameter($url, "Longitude", $options->getLongitude());
     $url = URLUtil::addQueryParameter($url, "DistanceUnit", $options->getDistanceUnit());
     $url = URLUtil::addQueryParameter($url, "Radius", $options->getRadius());
     return $url;
 }
예제 #8
0
 public function testAddParameterWithSpaces()
 {
     $url = self::BASE_URL;
     $url = \URLUtil::addQueryParameter($url, "Spaces", "value1 value2");
     $this->assertTrue(strcmp($url, BASE_URL . "&Spaces=value1%20value2") == 0);
 }