1
This commit is contained in:
@@ -28,6 +28,7 @@ class Prescription
|
||||
protected string $api_url;
|
||||
protected string $client_id;
|
||||
protected string $client_secret;
|
||||
protected string $pharmacy_code;
|
||||
protected array $header;
|
||||
public string $version = "v1";
|
||||
|
||||
@@ -36,6 +37,7 @@ class Prescription
|
||||
$this->api_url = config('prescription_platform.api_url');
|
||||
$this->client_id = config('prescription_platform.client_id');
|
||||
$this->client_secret = config('prescription_platform.client_secret');
|
||||
$this->pharmacy_code = config('prescription_platform.pharmacy_code');
|
||||
$this->container = ApplicationContext::getContainer();
|
||||
$this->client = $this->container->get(Client::class);
|
||||
}
|
||||
@@ -130,7 +132,7 @@ class Prescription
|
||||
{
|
||||
$option = [
|
||||
"json" => array(
|
||||
"pharmacyCode" => "ZD-10003",
|
||||
"pharmacyCode" => $this->pharmacy_code,
|
||||
"drugCode" => $product_platform_code,
|
||||
),
|
||||
];
|
||||
@@ -159,7 +161,7 @@ class Prescription
|
||||
{
|
||||
$option = [
|
||||
"json" => array(
|
||||
"pharmacyCode" => "JG-10009",
|
||||
"pharmacyCode" => $this->pharmacy_code,
|
||||
),
|
||||
];
|
||||
|
||||
@@ -251,7 +253,7 @@ class Prescription
|
||||
*/
|
||||
protected function httpRequest(string $path,array $arg = []): array
|
||||
{
|
||||
if ($path != "http://49.233.3.200:6304/api/thridapi/v1/user_thrid/token"){
|
||||
if ($path != $this->api_url . "v1/user_thrid/token"){
|
||||
$this->redis = $this->container->get(Redis::class);
|
||||
|
||||
$access_token = $this->redis->get("prescription_token");
|
||||
|
||||
Reference in New Issue
Block a user