GithubHelp home page GithubHelp logo

pkg6 / cloud-print Goto Github PK

View Code? Open in Web Editor NEW
13.0 1.0 7.0 65 KB

非官方云小票机SDK,支持飞鹅云,芯烨云,易联云,快递100,映美云,中午云,佳博云,优声云,365智能云打印等

License: MIT License

PHP 100.00%

cloud-print's Introduction

云小票机SDK-cloud-print

非官方云小票机SDK,支持飞鹅云,芯烨云,易联云,快递100,映美云,中午云,佳博云,优声云,365智能云打印等

安装

composer require pkg6/cloud-print

请求日志开启

\Pkg6\cloudPrint\Kernel\BaseClient::$request_log=true;

自定义缓存

基于https://packagist.org/packages/psr/simple-cache#1.0

$printer = \Pkg6\cloudPrint\Factory::Feieyun([
    'user' => '',
    'ukey' => '',
    'cache' => [
        //必须定义
        "class" => \Pkg6\Cache\cache\driver\File::class,
        //其他选项
        'expire'        => 0,
        'cache_subdir'  => true,
        'prefix'        => '',
        'path'          => './cache/',
        'hash_type'     => 'md5',
        'data_compress' => false,
        'tag_prefix'    => 'tag:',
        'serialize'     => [],
    ],
]);

案例

基于365智能云打印的 PHP 接口组件

$printer = \Pkg6\cloudPrint\Factory::Printcenter([
    'key' => '',
])->printer;

基于中午云的 PHP 接口组件

$printer = \Pkg6\cloudPrint\Factory::Zhongwuyun([
    'appid'     => '******',
    'appsecret' => '******',
])->printer;

基于 优声云 的 PHP 接口组件

$printer = \Pkg6\cloudPrint\Factory::Ushengyun([
    'appId'     => '10001',
    'appSecret' => '**********',
])->printer;

基于佳博云的 PHP 接口组件

$printer = \Pkg6\cloudPrint\Factory::Poscom([
    'memberCode' => '',
    'apiKey'     => '',
])->printer;

基于快递100的 PHP 接口组件

$printer = \Pkg6\cloudPrint\Factory::Kuaidi100([
    'key' => '',
    'secret' => '',
])->printer;

基于易联云的 PHP 接口组件

$printer = \Pkg6\cloudPrint\Factory::Yilianyun([
    'client_id'     => '',
    'client_secret' => '',
])->printer;

基于映美云的 PHP 接口组件

$printer = \Pkg6\cloudPrint\Factory::Jolimark([
    'app_id'  => '',
    'app_key' => '',
])->printer;

基于 芯烨云 的 PHP 接口组件

$printer = \Pkg6\cloudPrint\Factory::Xpyun([
    'user'    => '',
    'userKey' => '',
])->printer;

基于 飞鹅云 的 PHP 接口组件

$printer = \Pkg6\cloudPrint\Factory::Feieyun([
    'user' => '',
    'ukey' => '',
])->printer;

支持厂商

加入我们

如果你认可我们的开源项目,有兴趣为 cloud-print 的发展做贡献,竭诚欢迎加入我们一起开发完善。无论是 报告错误issues 或是 Pull Request 开发,那怕是修改一个错别字也是对我们莫大的帮助。

许可协议

MIT

cloud-print's People

Contributors

zzqqw avatar m809745357 avatar

Stargazers

Michael Lee avatar 咸鱼 avatar  avatar  avatar  avatar = - = avatar  avatar 白云飞 avatar  avatar cai avatar 李勋冠 avatar  avatar Xiulan Yan avatar

Watchers

Cobain avatar

cloud-print's Issues

易联云使用缓存的时候,文件缓存报错?

\Pkg6\cloudPrint\Kernel\Clients\CacheClient::setCache

这个方法不能使用

    /**
     * 设置缓存.
     * @param     $key
     * @param     $value
     * @return bool
     */
    public function setCache($key, $value)
    {
        return file_put_contents($key, unserialize($value));
    }

如果使用了 unserialize 方法就会报错,这里可以辛苦修改一下吗?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.