diff --git a/app/Providers/NikarayanServiceProvider.php b/app/Providers/NikarayanServiceProvider.php deleted file mode 100644 index c1dd5cb8..00000000 --- a/app/Providers/NikarayanServiceProvider.php +++ /dev/null @@ -1,30 +0,0 @@ -app->bind(NikarayanService::class, function () { - $url = "https://riws.rmto.ir/WebServices/NRPTrafficStatus.asmx?wsdl"; - $soapClient = new SoapClient($url); - return new NikarayanService($soapClient); - }); - } -} diff --git a/app/Services/NikarayanService.php b/app/Services/NikarayanService.php index 35998823..6f2b74bf 100644 --- a/app/Services/NikarayanService.php +++ b/app/Services/NikarayanService.php @@ -9,17 +9,12 @@ use SoapClient; class NikarayanService { - protected SoapClient $soapClient; - - public function __construct(SoapClient $soapClient) - { - $this->soapClient = $soapClient; - } - public function updateRoadObservedInfoByNikarayan(Request $request, RoadObserved $roadObserved, $files) { if (App::isProduction()) { + $url = "https://riws.rmto.ir/WebServices/NRPTrafficStatus.asmx?wsdl"; + $array = array('strUserName' => 'vaytelrop', 'strPassword' => 'VaYtelROP*2024', 'strAutoID' => $roadObserved->fk_RegisteredEventMessage, @@ -29,7 +24,10 @@ class NikarayanService 'strNextImageLink' => "https://rms.rmto.ir/".$files, 'strRMSDateAndTime' => $roadObserved->updated_at ); - return $this->soapClient->UpdateInfo_RoadObservedProblems($array); + + $soapClient = new SoapClient($url); + + return $soapClient->UpdateInfo_RoadObservedProblems($array); } return 0; diff --git a/app/Services/PaymentService.php b/app/Services/PaymentService.php index 6f391d1c..d8fac594 100644 --- a/app/Services/PaymentService.php +++ b/app/Services/PaymentService.php @@ -67,6 +67,6 @@ class PaymentService abort(500); } } - return 0; + return json_encode(['isPayed' => 1]); } } diff --git a/config/app.php b/config/app.php index a3391f41..a0c27ddd 100644 --- a/config/app.php +++ b/config/app.php @@ -179,10 +179,7 @@ return [ App\Providers\EventServiceProvider::class, App\Providers\RouteServiceProvider::class, App\Providers\TelescopeServiceProvider::class, - Barryvdh\Debugbar\ServiceProvider::class, - App\Providers\NikarayanServiceProvider::class, - ], /*