PHP code example of spanbin / yyfp

1. Go to this page and download the library: Download spanbin/yyfp library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

spanbin / yyfp example snippets


use spanbin\yyfp\Yyfp;

$yyfp = new Yyfp();

$fpqqlsh = 'SHTEST'.time();
$requestdatas = array(
    array(
        'FPQQLSH' => $fpqqlsh,
        'FPLX' => 4,
        'XSF_NSRSBH' => '201609140000001',
        'ORGCODE' => '20160914001',
        'GMF_MC' => '天津国联鸿泰科技有限公司',
        'GMF_DZDH' => '天津市河北区王串场街王串场四号路4号增19号 86-022-84847456',
        'GMF_YHZH' => '中国建设银行股份有限公司天津河北支行 12050166080000000517',
        'GMF_NSRSBH' => '11111111111',
        'ZDYBZ' => '这是放射所报名费xx单号的开票',
        'JSHJ' => 100.00,
        'items' => array(
            array(
                'XMMC' => '技术服务费',
                'SPBM' => '3040101',
                'XMJSHJ' => 100.00,
                'SL' => 0.13,
            )
        )
    )
);
$url = array(
    array(
        'fpqqlsh' => $fpqqlsh,
        'url' => 'https://github.com/spanbin/yyfp'
    )
);
$email = array(
      array(
      'fpqqlsh' => $fpqqlsh,
      'address' => '[email protected]'
      ) 
);
$params = array(
    'requestdatas' => json_encode($requestdatas),
    'email' => json_encode($email),          
    'url' => json_encode($url),
    'autoAudit' => 'true'
);

 echo '<pre/>';

$res = $yyfp->insertWithArray($params);
print_r($res);

$params = [
    'fpqqlsh' => $fpqqlsh
];

$res = $yyfp->queryInvoiceStatus($params);
print_r($res);