public function testMerchantLocationServiceInternationalMaestroAccepted() { $options = new MerchantLocationRequestOptions(Details::FEATURES_CASHBACK, 0, 25); $options->setCountry("USA"); $options->setPostalCode("46323"); $options->setInternationalMaestroAccepted(true); $merchants = $this->service->getMerchants($options); $this->assertTrue(count($merchants->getMerchant()) > 0); }
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; }