topphp / topphp-nuonuo-invoice
诺诺发票
v1.0.0
2020-09-09 06:32 UTC
Requires
- php: ~7.2
- ext-curl: *
- ext-json: *
Requires (Dev)
- squizlabs/php_codesniffer: ^3.5
- topphp/topphp-testing: ^1.0.0
This package is auto-updated.
Last update: 2025-02-09 16:41:42 UTC
README
诺诺发票 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.