Download the PHP package kylin987/netsale-report-sdk without Composer

On this page you can find all versions of the php package kylin987/netsale-report-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package netsale-report-sdk

netsale-report-sdk

网售票房上报 SDK(2025 协议)— 用于专资办正式票房上报,包含售票 / 退票上报和数据比对文件下载。

功能

方法 说明
reportTicket 票房数据上报(售票 operation=1 / 退票 operation=2),一次最多 50 条
downloadReportRecord 数据比对文件下载(需 V-STK p7AttachSign 签名),返回 zip 文件流

环境要求

安装

快速开始

配置参数

参数 类型 必填 说明
reportUrl string 上报接口地址(SDK 自动追加 /reportTicket
serviceUrl string 下载接口地址(SDK 自动追加 /data/downloadReportRecord
channelCode string 网售商编码(sendChannelCode)
certId string 证书 ID(通常等于 channelCode,V-STK 签名时使用)
certFile string 客户端证书路径(PEM 格式)
keyFile string 客户端私钥路径(PEM 格式,与证书分离)
keyFilePwd string 私钥密码(PEM 加密时使用,通常为空)
trustFile string 信任根证书路径(CA 链 PEM)
proxy string 代理地址(不填时默认禁用系统代理)
vstkSigner object 下载时必填 V-STK 签名器,需实现 VstkSignerInterface
httpLogger callable HTTP 日志回调,接收 array 上下文
reportToken string 业务层上报令牌(SDK 不使用,供业务层读取)

V-STK 签名器

downloadReportRecord 需要调用 V-STK 的 p7AttachSign 方法进行签名。PHP 无法直接调用 V-STK COM 组件,通过 VstkSignerInterface 接入外部签名服务。

接口定义

HTTP 签名桥实现示例

V-STK 签名桥配置要点

与 2025 协议的差异

与旧 zzb-sdk-php 的 netsale2025 模式相比:

联调脚本

包内附带冒烟测试脚本:

环境变量参见脚本头部注释。

数据模型

模型 说明
ReportTicket 上报票据(numberByDay, ticketNo, cinemaCode, operation 等 16 个字段)
ReportResult 上报响应(code, status, data, traceId),isSuccess() 判断是否 code === '200'

版本

版本 说明
v1.0.0 从 zzb-sdk-php 2.x 提取 netsale2025 逻辑,独立发布

License

MIT


All versions of netsale-report-sdk with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
ext-curl Version *
ext-openssl Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package kylin987/netsale-report-sdk contains the following files

Loading the files please wait ...