首页 发票查验 发票查验示例代码 获取发票类型[PHP]

获取发票类型示例代码[PHP]

作者: 阅读数:1860 上传时间:2019-07-15

获取发票类型

<?php
//获取发票类型
require_once 'curl.func.php';

$appkey = 'your_appkey_here';//你的appkey
$url = "https://api.jisuapi.com/invoiceverify/type?appkey=$appkey";
$result = curlOpen($url, ['ssl'=>true]);
$jsonarr = json_decode($result, true);

if($jsonarr['status'] != 0)
{
    echo $jsonarr['msg'];
    exit();
}
$invoiceverify = $jsonarr['result'];
foreach($invoiceverify as $val)
{
    echo $val['name'].' '.$val['type'].'
'; }