topphp/topphp-nuonuo-invoice

v1.0.0 2020-09-09 06:32 UTC

This package is auto-updated.

Last update: 2024-04-09 14:53:07 UTC


README

Latest Version on Packagist Software License Build Status Coverage Status Quality Score Total Downloads

诺诺发票 api

代码演示

<?php
//获取token
function testGetMerchantToken()
{
    try {
        $res = NuoNuo::instance()
            ->setAppKey("xxx")
            ->setAppSecret("xxx")
            ->getMerchantToken();
        $res = json_decode($res, true);
        var_dump($res);

    } catch (NuonuoException $e) {
        var_dump($e->errorMessage());
    }
}

//查询开票记录
function testQueryInvoiceQuantity()
{
    try {
        $senId = md5(uniqid());
        $res   = NuoNuo::instance()
            ->setAppKey("SD15125971")
            ->setAppSecret("SD354602BB0B48D0")
            ->sendPostSyncRequest(
                $senId,
                'xxx',
                'xxxx',
                'nuonuo.electronInvoice.queryInvoiceQuantity',
                json_encode([
                    'taxnum'           => 'xxxx',
                    'invoiceTimeStart' => '2018-03-19 00:00:00',
                    'invoiceTimeEnd'   => '2019-04-23 23:59:59',
                ])
            );
        var_dump($res);
    } catch (NuonuoException $e) {
        var_dump($e->errorMessage());
    }
}

Structure

组件结构

bin/        
build/
docs/
config/
src/
tests/
vendor/

Install

Via Composer

$ composer require topphp/topphp-nuonuo-invoice

Change log

Please see CHANGELOG for more information on what has changed recently.

Testing

$ composer test

Contributing

Please see CONTRIBUTING and CODE_OF_CONDUCT for details.

Security

If you discover any security related issues, please email sleep@kaituocn.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.