PHPackages                             lop/lop-opensdk-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. lop/lop-opensdk-php

ActiveLibrary

lop/lop-opensdk-php
===================

13.5k↓33.3%1PHP

Since Apr 11Pushed 1y ago1 watchersCompare

[ Source](https://github.com/gangaoh/lop-opensdk-php)[ Packagist](https://packagist.org/packages/lop/lop-opensdk-php)[ RSS](/packages/lop-lop-opensdk-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

请求示例
====

[](#请求示例)

使用方法
====

[](#使用方法)

```
require_once __DIR__ . "/vendor/autoload.php";

use Lop\LopOpensdkPhp\Filters\ErrorResponseFilter;
use Lop\LopOpensdkPhp\Filters\IsvFilter;
use Lop\LopOpensdkPhp\Filters\LoggerFilter;
use Lop\LopOpensdkPhp\Options;
use Lop\LopOpensdkPhp\Support\DefaultClient;
use Lop\LopOpensdkPhp\Support\GenericRequest;

# 生产环境: https://api.jdl.com
$client = new DefaultClient("{BASE_URI}");

$isvFilter = new IsvFilter("{APP_KEY}", "{APP_SECRET}", "{ACCESS_TOKEN}");
# STDOUT是PHP内置常量，表示输出到标准输出（控制台）
$loggerFilter = new LoggerFilter(STDOUT);
$errorResponseFilter = new ErrorResponseFilter();

$request = new GenericRequest();
$request->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();
```

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity15

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/99e4c508ab64ada39114e2da59425dea7a733608a0e909d1769b5df2adc267c8?d=identicon)[gangaoh](/maintainers/gangaoh)

---

Top Contributors

[![gangaoh](https://avatars.githubusercontent.com/u/28089783?v=4)](https://github.com/gangaoh "gangaoh (2 commits)")

---

Tags

configgithub-config

### Embed Badge

![Health badge](/badges/lop-lop-opensdk-php/health.svg)

```
[![Health](https://phpackages.com/badges/lop-lop-opensdk-php/health.svg)](https://phpackages.com/packages/lop-lop-opensdk-php)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
