public function soapExchange()
 {
     // create SOAP client and add service details
     SoapWrapper::add(function ($service) {
         $service->name('WoSAuthenticate')->wsdl('http://search.webofknowledge.com/esti/wokmws/ws/WOKMWSAuthenticate?wsdl')->trace(true)->cache(WSDL_CACHE_NONE);
     });
     SoapWrapper::service('WoSAuthenticate', function ($service) {
         // call authenticate() method to get SID cookie
         $auth_response = $service->call('authenticate', []);
         $cookie = $auth_response->return;
         // test for cookie return
         // print($cookie);
     });
     // create SOAP client and add service details
     $search_client = new SoapWrapper();
     $search_client::add(function ($service) {
         $service->name('WoSSearch')->wsdl('http://search.webofknowledge.com/esti/wokmws/ws/WokSearch?wsdl')->cookie('SID', $cookie)->trace(true)->cache(WSDL_CACHE_NONE);
     });
     /* if (isset($auth_response->return)) {
     
                 // if there is an SID returned then add it to the cookie attribute of the search client
                 $search_client->__setCookie('SID', $cookie);
             } else {
                 // route to relevant view to display throttle error
                 return redirect('throttle');
             } */
 }
 public function index()
 {
     SoapWrapper::add(function ($service) {
         $service->name('currency')->wsdl('http://currencyconverter.kowabunga.net/converter.asmx?WSDL')->trace(true);
         // Optional: (parameter: true/false)
     });
     $data = ['CurrencyFrom' => 'USD', 'CurrencyTo' => 'EUR', 'RateDate' => '2014-06-05', 'Amount' => '1000'];
     // Using the added service
     SoapWrapper::service('currency', function ($service) use($data) {
         //var_dump($service->getFunctions());
         var_dump($service->call('GetConversionAmount', [$data])->GetConversionAmountResult);
     });
 }
Exemplo n.º 3
0
 public function demo()
 {
     // Add a new service to the wrapper
     SoapWrapper::add(function ($service) {
         $service->name('MDS')->wsdl('http://www.collivery.co.za/wsdl/v2')->trace(true);
     });
     $data = ['app_name' => 'Shopify', 'app_version' => '1.0', 'app_host' => 'shopify.dev', 'app_url' => 'shopify.dev'];
     // Using the added service
     SoapWrapper::service('MDS', function ($service) use($data) {
         var_dump($service->getFunctions());
         var_dump($service->call('authenticate', ['*****@*****.**', 'api123']));
         var_dump($service->call('get_location_types', $data)->get_location_typesResult);
     });
 }
Exemplo n.º 4
0
 public function getCustomer($dni)
 {
     $this->init();
     $this->result = null;
     $data = ['wPwd' => 't874j563bk580fghu', 'wDocId' => $dni];
     SoapWrapper::service('customer', function ($service) use($data) {
         $response = $service->call('su_PersonaGetByDocId', [$data]);
         $this->result = explode('|', $response->su_PersonaGetByDocIdResult);
     });
     if (count($this->result) > 1) {
         return true;
     }
     return false;
 }
Exemplo n.º 5
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     SoapWrapper::add(function ($service) {
         $service->name('geolocation')->wsdl('http://www.ipswitch.com/netapps/geolocation/iplocate.asmx?WSDL')->trace(true)->cache(WSDL_CACHE_NONE);
     });
     $ip_Array = ["2.139.164.235"];
     $IP = $ip_Array[array_rand($ip_Array)];
     $data = ['sIPAddress' => $IP];
     $dataLocation = null;
     SoapWrapper::service('geolocation', function ($service) use($data, &$dataLocation) {
         $dataLocation = $service->call('GetLocationRawOutput', [$data])->GetLocationRawOutputResult;
     });
     $region = $dataLocation->geolocation_data->region_name;
     //dd($region);
     return \View::make("location");
 }
Exemplo n.º 6
0
 public function demo()
 {
     //$customHeader = '';
     //$namespace = 'http://microsoft.com/webservices/';
     //$namespace = 'http://tempuri.org/';
     // Add a new service to the wrapper
     $client = SoapWrapper::add(function ($service) {
         $service->name('neomanager')->wsdl('http://89.122.46.210/InterfacesWS/IInterfacesBO3.asmx?WSDL')->trace(true)->cache(WSDL_CACHE_NONE)->options(['plngVersiune' => 1, 'pstrNumeFirma' => 'TESTE AUGER', 'pstrUtilizator' => 'Interfete', 'pstrParolaSecurizata' => '007a142775e4bec2c3c6ee9ffe86b1f8']);
         // Optional: Set some extra options
     });
     $data = ['ClientToken' => ''];
     // Using the added service
     SoapWrapper::service('neomanager', function ($service) use($data) {
         //var_dump($service->LogInResult);
         //var_dump($service->getFunctions());
         //var_dump($service->call('GetConfigVersion', [$data])->GetConfigVersion );
     });
 }
 /**
  * Handle a login request to the application.
  *
  * @param  \Illuminate\Http\Request  $request
  * @return \Illuminate\Http\Response
  */
 public function login(Request $request)
 {
     $this->validateLogin($request);
     // If the class is using the ThrottlesLogins trait, we can automatically throttle
     // the login attempts for this application. We'll key this by the username and
     // the IP address of the client making these requests into this application.
     $throttles = $this->isUsingThrottlesLoginsTrait();
     if ($throttles && $this->hasTooManyLoginAttempts($request)) {
         return $this->sendLockoutResponse($request);
     }
     $credentials = $this->getCredentials($request);
     $username = $credentials['username'];
     $password = $credentials['password'];
     // Add a new service to the wrapper
     SoapWrapper::add(function ($service) {
         $service->name('ers')->wsdl(env('ERS_WEBSERVICE'))->trace(true)->cache(WSDL_CACHE_NONE);
     });
     $data = ['whitepaw' => env('ERS_WHITEPAW'), 'username' => $credentials['username'], 'password' => $credentials['password']];
     // Using the added service
     $result = SoapWrapper::service('ers', function ($service) use(&$data) {
         $data = $service->call('CheckLogin', [$data]);
     });
     $credentials['last_name'] = $data->lname;
     $credentials['first_name'] = $data->fname;
     $credentials['title'] = $data->title;
     $credentials['email'] = $data->email;
     $credentials['ers_id'] = $data->partnerId;
     $credentials['group'] = $data->group1;
     $credentials['isInDB'] = $data->isInDB;
     if (Auth::attempt($credentials, $request->has('remember'))) {
         return $this->handleUserWasAuthenticated($request, $throttles);
     }
     // If the login attempt was unsuccessful we will increment the number of attempts
     // to login and redirect the user back to the login form. Of course, when this
     // user surpasses their maximum number of attempts they will get locked out.
     if ($throttles) {
         $this->incrementLoginAttempts($request);
     }
     return redirect($this->loginPath())->withInput($request->only($this->loginUsername(), 'remember'))->withErrors([$this->loginUsername() => $this->getFailedLoginMessage()]);
 }
Exemplo n.º 8
0
 public function verify($au, $amount, $gate)
 {
     SoapWrapper::add(function ($service) {
         $service->name('jahanpay')->wsdl('http://www.jahanpay.com/webservice?wsdl');
     });
     $data = [$this->gateApiCode($gate), $amount, $au];
     SoapWrapper::service('jahanpay', function ($service) use($data) {
         $this->verify = $service->call('verification', $data);
     });
 }
Exemplo n.º 9
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     SoapWrapper::add(function ($service) {
         $service->name('geolocation')->wsdl('http://www.ipswitch.com/netapps/geolocation/iplocate.asmx?WSDL')->trace(true)->cache(WSDL_CACHE_NONE);
     });
     $ip_Array = ["206.200.251.19", "81.36.180.7", "186.67.91.98", "88.190.229.170", "131.228.17.26", "192.133.108.138", "62.43.192.232", "77.185.255.255"];
     $IP = $ip_Array[array_rand($ip_Array)];
     $data = ['sIPAddress' => $IP];
     $dataLocation = null;
     SoapWrapper::service('geolocation', function ($service) use($data, &$dataLocation) {
         $dataLocation = $service->call('GetLocationRawOutput', [$data])->GetLocationRawOutputResult;
     });
     $region = $dataLocation->geolocation_data->region_name;
     //dd($region);
     switch ($region) {
         case 'Region Metropolitana':
             $citys['lat'] = -33.461722;
             $citys['lng'] = -70.655276;
             $citys['address'] = "San Ignacio 1215-1233, Santiago-Chile";
             $citys['city'] = "santiago";
             break;
         case 'Madrid':
             $citys['lat'] = 40.4167754;
             $citys['lng'] = -3.7037901999999576;
             $citys['address'] = "Sol, 1, Madrid-España";
             $citys['city'] = "madrid";
             break;
         case 'New York':
             $citys['lat'] = 40.589018;
             $citys['lng'] = -73.659735;
             $citys['address'] = "135 E Park Ave, NY-USA";
             $citys['city'] = "newyork";
             break;
         case 'London, City of':
             $citys['lat'] = 51.53936;
             $citys['lng'] = -0.142594;
             $citys['address'] = "176 Camden High St, London-UK";
             $citys['city'] = "london";
             break;
         case 'Porto':
             $citys['lat'] = 41.14068;
             $citys['lng'] = -8.611758999999999;
             $citys['address'] = "Travessa dos Canastreiros 1, Porto-Portugal";
             $citys['city'] = "porto";
             break;
         case 'Comunidad Valenciana':
             $citys['lat'] = 39.57787;
             $citys['lng'] = 2.65088;
             $citys['address'] = "plaça dels Patins, Palma de mayorca-Islas baleares";
             $citys['city'] = "mayorca";
             break;
         case 'Berlin':
             $citys['lat'] = 52.513108;
             $citys['lng'] = 13.391376;
             $citys['address'] = "Taubenstrabe, 10117 , Berlin-Alemania";
             $citys['city'] = "berlin";
             break;
         default:
             $citys['lat'] = 48.865747;
             $citys['lng'] = 2.344784;
             $citys['address'] = "II Distrito de París, París-France";
             $citys['city'] = "paris";
             break;
     }
     return view('layout.location', compact('citys'));
 }
Exemplo n.º 10
0
 function payment_step1()
 {
     SoapWrapper::add(function ($service) {
         $service->name('payment')->wsdl('https://esitef-homologacao.softwareexpress.com.br/e-sitef-html/Payment2?wsdl')->trace(true);
         // Optional: (parameter: true/false)
     });
     /*$data = [
           'CurrencyFrom' => 'USD',
           'CurrencyTo'   => 'EUR',
           'RateDate'     => '2014-06-05',
           'Amount'       => '1000'
       ];*/
     // Using the added service
     SoapWrapper::service('payment', function ($service) use($data) {
         var_dump($service->getFunctions());
         /*var_dump($service->call('GetConversionAmount', [$data])->GetConversionAmountResult);*/
     });
 }