Download the PHP package ssh/smct-sdk-php without Composer

On this page you can find all versions of the php package ssh/smct-sdk-php. 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 smct-sdk-php

SMCT SDK PHP

智慧食堂第三方 API & 人脸采集 API PHP SDK 组件包。

功能概览

模块 客户端类 说明
智慧食堂 API SmctClient 支付、订单、菜品、客餐券、统计等 26 个接口
人脸采集 API FaceClient H5 人脸绑定 + 后台同步管理 5 个接口

环境要求

安装

或不使用 Composer,手动引入:

快速开始

智慧食堂 API

人脸采集 API

更多用法见 examples/ 目录。

配置说明

Config 参数

参数 说明 默认值
appId 应用标识 SYSTEM002
channelCode 渠道代码 F1001
appChannelCode 应用部署渠道代码 JKWB
baseUrl 基础 URL 测试环境地址
deviceNum 设备号 -
timeout 请求超时(秒) 30
sm2PrivateKey SM2 私钥(Hex/Base64,可选) -
sm2PublicKey SM2 公钥(Hex) -
faceBaseUrl 人脸采集 API 地址 -
faceAppId 人脸采集 appId SYSTEM002
faceAesKey 人脸采集 AES 密钥 -

环境地址

环境 baseUrl
测试 https://smct-test.fintechabchina.com
生产 https://smct.fintechabchina.com

API 接口清单

SmctClient - 智慧食堂 API

基础功能

方法 接口
getCanteenId() 获取食堂基础信息
getUserCard($groupId) 获取公司下所有实体卡号
getCardBalance($type, $canteenId, ...) 获取饭卡余额

支付

方法 接口
flexiblePay(...) 设备端灵活支付
syncOfflineOrders($orders, ...) 离线模式订单同步
getMealTime($canteenId) 获取固定餐餐段信息
fixedMealPay($deals) 固定餐消费支付
refund($orderNo, $canteenId, ...) 交易退款(冲正)

线上订单

方法 接口
getOrderInfo($qrCode, $canteenId) 取餐码获取订单详情
scanCodeVerify($qrCode, $canteenId, $transId) 取餐码核销
pullOrders($canteenId, ...) 拉取订单数据
getEquipOrders(...) 设备订单分页查询
getScanOrders($canteenId, $type, ...) 获取待核销餐
handleOrder($canteenId, $operType, $orderIds) 订单处理
getDishInfos($canteenId, ...) 餐段菜品信息查询
orderPay($params) 设备选菜下单支付
getUserOrders($params) 用户订单查询
getEquipDishInfo(...) 设备可取菜品查询

客餐券

方法 接口
checkCoupon($qrCode, $canteenId) 获取客餐券信息
useCoupon($qrCode, $canteenId, $transId) 核销客餐券

统计

方法 接口
getCanteenPaymentStatistics($canteenId) 食堂每日收款汇总
getDishOrderStatistics(...) 菜品订单统计
getIntervalOrderStatistics(...) 餐段订单统计
getGradeDishOrderStatistics(...) 年级班级菜品统计
getFoodWasteStatistics(...) 厨余垃圾统计
getCanteenDevPaymentStatistics($canteenId) 设备今日消费汇总

FaceClient - 人脸采集 API

H5 页面接口

方法 接口
queryBindStatus($userId, $companyId, $username) 查询绑定状态
submitFaceBind($userId, $companyId, $username, $base64) 提交人脸绑定
deleteFaceBind($userId, $companyId) 删除人脸绑定

后台同步接口(AES 加密)

方法 接口
queryFaceBindInfo($start, $end, ...) 查询人脸采集情况
batchDeleteFaceBindInfo($companyId, $userIds) 批量删除人脸绑定

加密算法

智慧食堂 API(SM2 + SM3 + SM4)

请求加密流程:

  1. 生成随机 16 字节 → SM4-CBC(OpenSSL) 加密业务数据
  2. SM2 公钥加密随机密钥和盐值 → extension (C1C3C2, 加“04”前缀)
  3. 在原始业务数据上计算 SM3 签名 → SM4 加密签名 → nonceString
  4. 传输时 data 字段为密文

响应处理:SM4 解密(使用客户端请求时的随机密钥)→ SM3 验签

人脸采集 API(AES)

项目结构

测试

1. 配置环境变量

2. 执行测试

许可证

MIT


All versions of smct-sdk-php with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
ext-json Version *
ext-curl Version *
ext-mbstring Version *
ext-gmp Version *
lpilp/guomi Version ^2.0
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 ssh/smct-sdk-php contains the following files

Loading the files please wait ...