Download the PHP package youzanyun/open-sdk without Composer

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

open-sdk-php

Latest Version on Packagist Total Downloads Build Status

YouzanYun SDK

安装

  1. 使用 composer

推荐使用该方式安装, 更优雅

  1. 不使用 composer 管理

如果你的项目不使用composer管理, 可以直接下载 Release包 并解压, 然后在项目中添加如下代码:

请注意, 需要下载的是最新的 youzanyun-open-sdk.zip 压缩包, 而不是 Source code 压缩包, YOUR_SDK_PATH 需更改为项目实际路径.

使用

详情参考 examples

1. 获取及刷新access_token

工具型应用 获取access_token

自用型应用 获取access_token

工具型应用及自用型应用 刷新access_token

2. 接口调用

Token方式

免鉴权方式 (仅支持免鉴权接口)

3. 加密消息解密

参考 examples/crypto/decrypt.php

4. 加解密调用

4.1 脱敏规则:

规则名称 脱敏规则 示例示例
地址脱敏 实现地址的信息脱敏:地址中数字使用*代替 杭州市西湖区蒋村街道**号*座*楼*室
银行卡脱敏 银行卡号的信息脱敏:前2,后4展示,其他使用*代替 19**2135
名字脱敏 中文名称的信息脱敏:展示第一个字,其他使用*代替 张*
邮箱脱敏 邮箱地址的信息脱敏:展示前2位,和邮箱后缀 zy**@163.com
企业名称脱敏 企业名称的信息脱敏:展示前4个汉字,后2个汉字,中间固定4个* 杭州有赞****公司
身份证脱敏 身份证号信息脱敏:展示前2位,后4位 13**0630
手机脱敏 手机号的信息脱敏:展示前3,后4,其他使用*代替 135****3263

脱敏类型: MaskHandler::$const_address 地址,MaskHandler::$const_bank_card 银行卡,MaskHandler::$const_name 中文名,MaskHandler::$const_email 邮箱,MaskHandler::$const_company_name 企业名称,MaskHandler::$const_id_card 身份证,MaskHandler::$const_mobile 手机号

4.2 密文检索:

密文摘要的长度是原明文的6倍左右,开发者需要合理评估数据库字段长度,避免字段超长

开发者需要新增数据库字段存储密文摘要,在模糊查询是调用密文摘要接口生成查询信息对应密文摘要并去数据库中模糊查询;例如需要对数据库中mobile字段的密文进行检索,则需要新增mobile_encrypt_digest字段(数据库字段名自定义,此处仅举例),在手机号落库时调用密文检索摘要方法生成手机号(e.g. 18736956666)对应的密文检索摘要M1并落库到mobile_encrypt_digest中,模糊查询时调用密文检索摘要方法生成查询信息(e.g. 187)的密文检索摘要M2,并调用模糊查询sql进行模糊查询(e.g. selet * from mobile_info where mobile_encrypt_digest like '%M2%')

License

The MIT License. Please see License File for more information.


All versions of open-sdk with dependencies

PHP Build Version
Package Version
Requires ext-curl Version *
ext-json Version *
ext-openssl Version *
guzzlehttp/guzzle Version ^6.3|^7.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 youzanyun/open-sdk contains the following files

Loading the files please wait ....