PHPackages                             lin07ux/ant-open - 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. [API Development](/categories/api)
4. /
5. lin07ux/ant-open

ActiveLibrary[API Development](/categories/api)

lin07ux/ant-open
================

A sdk for Ant Financial Open Platform

v1.2.0(6y ago)0641MITPHP

Since Dec 20Pushed 6y ago1 watchersCompare

[ Source](https://github.com/Lin07ux/ant-open)[ Packagist](https://packagist.org/packages/lin07ux/ant-open)[ RSS](/packages/lin07ux-ant-open/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (5)Used By (0)

ANT OPEN
========

[](#ant-open)

这是一个用于实现蚂蚁金服开放平台相关服务的 PHP SDK。实现方式参考了蚂蚁金服开放平台的[文档](https://docs.alipay.com/zmxy/271)和官方提供的 [PHP SDK](https://docs.alipay.com/zmxy/54/103419#s1)。

> 人脸识别认证由芝麻认证改为支付宝身份认证，相应的 API 为：`AlipayUserCertifyOpenInitializeRequest`(初始化)、`AlipayUserCertifyOpenCertifyRequest`(开始认证)、`AlipayUserCertifyOpenQueryRequest`(查询结果)，使用示例参见 [支付宝身份认证](./docs/alipay-user-certify.md)。

安装
--

[](#安装)

```
composer require lin07ux/ant-open
```

一、使用
----

[](#一使用)

### 1.1 初始化客户端

[](#11-初始化客户端)

在使用相关接口之前，需要先初始化一个`AlipayClient`对象，并设置相应的`appid`、支付宝公钥、商户私钥。

```
use AntOpen\AlipayClient;

$client = new AlipayClient('appid');
$client->setAlipayRsaPublicKey('alipay_rsa_public_key_file', true)
    ->setCustomerRsaPrivateKey('customer_rsa_private_key_file', true);
```

### 1.2 发送请求

[](#12-发送请求)

得到客户端之后即可构造不同用途的请求，以得到相应的响应结果。

比如，下面实例化一个认证初始化对象，并发送请求得到对应的请求标识：

```
use AntOpen\Request\AlipayUserCertifyOpenInitializeRequest;

$initRequest = new AlipayUserCertifyOpenInitializeRequest([
    'outer_order_no' => 'ZGYD201610252323000001234',
    'biz_code' => 'FACE',
    'identity_param' => [
        'identity_type' => 'CERT_INFO',
        'cert_type' => 'IDENTITY_CARD',
        'cert_name' => '收委',
        'cert_no' => '260104197909275964',
    ],
    'merchant_config' => [
        'return_url' => 'https://example.com/alipay/back',
    ],
]);

$response = $client->request($request)->getResponse();

echo $response['certify_id'];
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 97.7% 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.

###  Release Activity

Cadence

Every ~157 days

Total

4

Last Release

2229d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e3f9cbf65c04012c154f9210261d99e57249433aec6c4c0df5cd605d2be61242?d=identicon)[Lin07ux](/maintainers/Lin07ux)

---

Top Contributors

[![Lin07ux](https://avatars.githubusercontent.com/u/8132527?v=4)](https://github.com/Lin07ux "Lin07ux (43 commits)")[![ztqgit](https://avatars.githubusercontent.com/u/33917380?v=4)](https://github.com/ztqgit "ztqgit (1 commits)")

### Embed Badge

![Health badge](/badges/lin07ux-ant-open/health.svg)

```
[![Health](https://phpackages.com/badges/lin07ux-ant-open/health.svg)](https://phpackages.com/packages/lin07ux-ant-open)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

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