Skip to content

Commit 47445d8

Browse files
committed
Always use api.postcode.eu domain
1 parent 71a102d commit 47445d8

File tree

1 file changed

+3
-7
lines changed
  • app/code/community/PostcodeNl/Api/Helper

1 file changed

+3
-7
lines changed

app/code/community/PostcodeNl/Api/Helper/Data.php

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
class PostcodeNl_Api_Helper_Data extends Mage_Core_Helper_Abstract
33
{
44
const API_TIMEOUT = 3;
5-
const API_URL = 'https://api.postcode.nl';
5+
const API_URL = 'https://api.postcode.eu';
66

77
protected $_modules = null;
88

@@ -136,7 +136,7 @@ public function _lookupAddress($postcode, $houseNumber, $houseNumberAddition)
136136
$response = array();
137137

138138
try {
139-
$url = $this->_getServiceUrl() . '/rest/addresses/' . rawurlencode($postcode). '/'. rawurlencode($houseNumber) . '/'. rawurlencode($houseNumberAddition);
139+
$url = $this->_getServiceUrl() . '/nl/v1/addresses/' . rawurlencode($postcode). '/'. rawurlencode($houseNumber) . '/'. rawurlencode($houseNumberAddition);
140140

141141
$jsonData = $this->_callApiUrlGet($url);
142142

@@ -318,11 +318,7 @@ protected function _getSecret()
318318

319319
protected function _getServiceUrl()
320320
{
321-
$serviceUrl = trim($this->_getStoreConfig('postcodenl_api/development_config/api_url'));
322-
if (empty($serviceUrl))
323-
$serviceUrl = self::API_URL;
324-
325-
return $serviceUrl;
321+
return self::API_URL;
326322
}
327323

328324
protected function _getMagentoVersion()

0 commit comments

Comments
 (0)