zhaohangyang/lop-opensdk-php

There is no license information available for the latest version (1.0.3) of this package.

Installs: 15

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/zhaohangyang/lop-opensdk-php

1.0.3 2022-10-27 06:47 UTC

This package is not auto-updated.

Last update: 2025-09-26 18:25:19 UTC


README

请求示例

setDomain("{DOMAIN}");//对接方案的编码,应用订购对接方案后可在订阅记录查看 $request->setPath("{PATH}");//api的path,可在API文档查看 $request->setMethod("POST");//只支持POST // 序列化后的JSON字符串 $request->setBody("{BODY}"); // 为请求添加ISV模式过滤器,自动根据算法计算开放平台鉴权及签名信息 $request->addFilter($isvFilter); // 为请求添加日志过滤器,日志将会输出到STDOUT,建议仅在测试时使用 $request->addFilter($loggerFilter); // 为请求添加错误响应解析过滤器,如果不添加需要手动解析错误响应 $request->addFilter($errorResponseFilter); $options = new Options(); $options->setAlgorithm(Options::MD5_SALT); //$options->setAlgorithm(Options::HMAC_MD5); //$options->setAlgorithm(Options::HMAC_SHA1); //$options->setAlgorithm(Options::HMAC_SHA256); //$options->setAlgorithm(Options::HMAC_SHA512); $response = $client->execute($request, $options); echo $response->getBody();