数电票怎么查询真伪|发票识别接口|发票查验接口|PHP接口文档

时间:2024-03-30 20:41:37
<?php class Sample { public function run() { $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => 'https://netocr.com/verapi/v2/verInvoice.do', CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_POSTFIELDS => array('key' => 'M***********g','secret' => '3***********6','typeId' => '3007','invoiceCode' => '*******','invoiceNumber' => '**********','billingDate' => '********','totalAmount' => '*************','checkCode' => '*********','salesTaxNo' => '*********','orderNo' => '*********'), )); $response = curl_exec($curl); curl_close($curl); echo $response; } } $rtn = (new Sample())->run(); print_r($rtn);