Skip to content

Commit e678ef9

Browse files
committed
Merge pull request #29 from Peardian/setstore
Service URL Override
2 parents 99e8efe + 9230d4e commit e678ef9

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

amazon-config.default.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
$store['YourAmazonStore']['marketplaceId'] = ''; //Marketplace ID for this store
2222
$store['YourAmazonStore']['keyId'] = ''; //Access Key ID
2323
$store['YourAmazonStore']['secretKey'] = ''; //Secret Access Key for this store
24+
$store['YourAmazonStore']['serviceUrl'] = ''; //optional override for Service URL
2425

2526
//Service URL Base
2627
//Current setting is United States

includes/classes/AmazonCore.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,8 +361,9 @@ public function setConfig($path){
361361
include($path);
362362
$this->config = $path;
363363
$this->setLogPath($logpath);
364-
if (isset($AMAZON_SERVICE_URL))
365-
$this->urlbase = $AMAZON_SERVICE_URL;
364+
if (isset($AMAZON_SERVICE_URL)) {
365+
$this->urlbase = $AMAZON_SERVICE_URL;
366+
}
366367
} else {
367368
throw new Exception("Config file does not exist or cannot be read! ($path)");
368369
}
@@ -427,6 +428,9 @@ public function setStore($s=null){
427428
if(!array_key_exists('secretKey', $store[$s])){
428429
$this->log("Secret Key is missing!",'Warning');
429430
}
431+
if (!empty($store[$s]['serviceUrl'])) {
432+
$this->urlbase = $store[$s]['serviceUrl'];
433+
}
430434

431435
} else {
432436
$this->log("Store $s does not exist!",'Warning');

nbproject/project.properties

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,9 @@ auxiliary.org-netbeans-modules-php-phpunit.customSuite_2e_path=
66
auxiliary.org-netbeans-modules-php-phpunit.phpUnit_2e_path=
77
auxiliary.org-netbeans-modules-php-phpunit.test_2e_groups_2e_ask=false
88
auxiliary.org-netbeans-modules-php-phpunit.test_2e_run_2e_all=false
9-
file.reference.athena-includes=../../includes
10-
file.reference.athena-includes-1=../../../includes
119
ignore.path=
1210
include.path=\
13-
${php.global.include.path}:\
14-
${file.reference.athena-includes-1}
11+
${php.global.include.path}
1512
php.version=PHP_54
1613
source.encoding=UTF-8
1714
src.dir=.

0 commit comments

Comments
 (0)