Skip to content

topphp/topphp-nuonuo-invoice

Repository files navigation

topphp-nuonuo-invoice

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.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages