remove nikarayan service provider

This commit is contained in:
2024-04-20 11:05:12 +03:30
parent bc47eeafd5
commit 3fe1ed3746
4 changed files with 7 additions and 42 deletions

View File

@@ -1,30 +0,0 @@
<?php
namespace App\Providers;
use App\Services\NikarayanService;
use Illuminate\Support\ServiceProvider;
use SoapClient;
class NikarayanServiceProvider extends ServiceProvider
{
/**
* Register services.
*/
public function register(): void
{
//
}
/**
* Bootstrap services.
*/
public function boot(): void
{
$this->app->bind(NikarayanService::class, function () {
$url = "https://riws.rmto.ir/WebServices/NRPTrafficStatus.asmx?wsdl";
$soapClient = new SoapClient($url);
return new NikarayanService($soapClient);
});
}
}

View File

@@ -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;

View File

@@ -67,6 +67,6 @@ class PaymentService
abort(500);
}
}
return 0;
return json_encode(['isPayed' => 1]);
}
}

View File

@@ -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,
],
/*