From 141bad61980bec616695aa304892a36d9b6f3240 Mon Sep 17 00:00:00 2001 From: haroonkhan Date: Wed, 29 May 2019 11:21:25 +0500 Subject: [PATCH] Update SiteId dynamically --- src/Ebay.php | 3 ++- src/EbayServices.php | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Ebay.php b/src/Ebay.php index 1b298e5..e6052a6 100644 --- a/src/Ebay.php +++ b/src/Ebay.php @@ -35,7 +35,8 @@ public function getAuthToken(){ /* * Return configurations from Config */ - public function getConfig(){ + public function getConfig($args=[]){ + $this->config['siteId'] = isset($args['siteId'])?$args['siteId']:$this->config['siteId']; return $this->config; } } \ No newline at end of file diff --git a/src/EbayServices.php b/src/EbayServices.php index 6b34a36..40470a0 100644 --- a/src/EbayServices.php +++ b/src/EbayServices.php @@ -8,10 +8,10 @@ class EbayServices { private $sdk; - function __construct() + function __construct($args=[]) { $ebay = new Ebay(); - $config = $ebay->getConfig(); + $config = $ebay->getConfig($args); $this->sdk = new Sdk($config); }