@@ -50,6 +50,16 @@ public function __construct() {
5050 "GET:ws.marchetemporali.com/availability " ,
5151 "GET:ws.marchetemporali.com/marche " ,
5252 "POST:ws.marchetemporali.com/check_lotto " ,
53+ "GET:visengine2.altravia.com/fornitori " ,
54+ "GET:ws.leicode.info/lei-records " ,
55+ "POST:ws.leicode.info/create-lei " ,
56+ "POST:ws.leicode.info/renew-lei " ,
57+ "DELETE:visengine2.altravia.com/richiesta " ,
58+ "GET:visengine2.altravia.com/visure " ,
59+ "POST:visengine2.altravia.com/richiesta " ,
60+ "PUT:visengine2.altravia.com/richiesta " ,
61+ "GET:visengine2.altravia.com/richiesta " ,
62+ "GET:visengine2.altravia.com/documento " ,
5363 "POST:ws.marchetemporali.com/marca " ,
5464 "POST:ws.marchetemporali.com/verifica " ,
5565 "POST:ws.marchetemporali.com/analisi " ,
@@ -135,32 +145,80 @@ public function testClientInstance() {
135145 // $raccomandata->creaRaccomandataByData($data);
136146 // }
137147
138- public function testSms () {
139- $ recipients = [
140- [
141- 'number ' => '+39-3939989741 ' ,
142- 'fields ' => ['nome ' => 'NomeDestinatario ' ]
143- ]
144- ];
145- $ singleSms = $ this ->openapi ->SMS ->sendOne ('test ' , '+39-3939989741 ' , 'prova ' , null , 1 , null , true );
148+ // public function testSms() {
149+ // $recipients = [
150+ // [
151+ // 'number' => '+39-3939989741',
152+ // 'fields' => ['nome' => 'NomeDestinatario']
153+ // ]
154+ // ];
155+ // $singleSms = $this->openapi->SMS->sendOne('test', '+39-3939989741', 'prova', null, 1, null, true);
146156
147- $ message = $ this ->openapi ->SMS ->getMessage ($ singleSms ->data ->id );
157+ // $message = $this->openapi->SMS->getMessage($singleSms->data->id);
148158
149- $ this ->assertEquals (true , $ singleSms ->success );
150- $ this ->assertEquals (true , $ message ['success ' ]);
151- }
152-
153- // public function testVisura() {
154- // // $visura = new VisRequest('eccbc87e4b5ce2fe28308fd9f2a7baf3');
155- // $response = $this->openapi->visengine->getRequestByIdVisura('eccbc87e4b5ce2fe28308fd9f2a7baf3');
156- // $this->assertNotEmpty($response);
157- // var_dump($response);
159+ // $this->assertEquals(true, $singleSms->success);
160+ // $this->assertEquals(true, $message['success']);
158161 // }
159162
163+ public function testVisura () {
164+ $ this ->openapi ->visengine ->setHash ('eccbc87e4b5ce2fe28308fd9f2a7baf3 ' );
165+ $ visura = $ this ->openapi ->visengine ->createRequest ();
166+ var_dump ($ visura );
167+
168+ $ response = $ this ->openapi ->visengine ->getRequestByIdVisura ('eccbc87e4b5ce2fe28308fd9f2a7baf3 ' );
169+ $ this ->assertNotEmpty ($ response );
170+ // var_dump($response);
171+ }
172+
160173 // public function testFirmaDigitale() {
161174 // $data = json_decode(file_get_contents(__DIR__.'/esempio_firma.json'), true);
162175 // $data['codice_prodotto'] = 'FIR';
163176 // $response = $this->openapi->firmaDigitale->requestProduct($data);
164177 // $this->assertNotEmpty($response);
165178 // }
179+ // public function testcreaVisura() {
180+
181+ // $this->openapi->visengine->setHash($visura->hash);
182+ // $request = $this->openapi->visengine->createRequest();
183+ // $res = $request->setJson((object)$json);
184+ // if($request->isValidJson() && !$visura->show_form){
185+ // $request->setState(1);
186+ // $request->setCallbackData(site_url("callbacks/ordini/visure"),(object)["order_id"=>"".$order_id, "detail_key"=>$detail_key]);
187+ // $request = $this->openapi->visengine->sendRequest($request);
188+ // }
189+ // }
190+
191+ // public function callbackVisura(Request $data) {
192+ // $data =json_decode(file_get_contents('php://input'));
193+ // $request = $this->openapi->visengine->getRequestByData($data);
194+ // $ret['id'] = $request->getId();
195+ // $ret['stato'] = $request->getStatoRichiesta();
196+ // $ret['stato_ricerca'] = $request->getStatoRicerca();
197+ // if($request->hasSearchResult()){
198+ // $ret['ricerche'] = $request->getSearchResult();
199+ // $ret['search_count'] = $request->getSearchCount();
200+ // $ret['has_search_result'] = TRUE;
201+ // $ret['search_id'] = $request->getSearchId();
202+ // }else{
203+ // if($request->getStatoRichiesta() == "Dati disponibili" || $request->getStatoRichiesta() == "Visura evasa"){
204+ // $document = $this->openapi->visengine->getDocument($id_visura)->getDocument();
205+ // if($document != NULL && $document->file != ""){
206+ // $has_document = TRUE;
207+ // //salviamo il file
208+ // file_put_contents("writable/documenti/{$id_visura}.bin", $document->file);
209+ // }
210+ // }
211+ // }
212+ // }
213+
214+ public function testcreaVisura () {
215+
216+ $ this ->openapi ->visengine ->setHash ('8f14e45fceea167a5a36dedd4bea2543 ' );
217+ $ request = $ this ->openapi ->visengine ->createRequest ();
218+ $ request ->setState (1 );
219+ $ request ->setCallbackData ('https://example.com ' , new stdClass (), 'POST ' );
220+ $ request ->setJson (['$0 ' => 'abcd ' , '$1 ' => '12485671007 ' ]);
221+ $ visura = $ this ->openapi ->visengine ->sendRequest ($ request );
222+
223+ }
166224}
0 commit comments