PHPackages                             julong/pay - 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. [Payment Processing](/categories/payments)
4. /
5. julong/pay

ActiveLibrary[Payment Processing](/categories/payments)

julong/pay
==========

pay library

1.0.3(8y ago)0381MITPHPPHP &gt;=7.0.0

Since Jan 25Pushed 8y agoCompare

[ Source](https://github.com/julonglu/pay)[ Packagist](https://packagist.org/packages/julong/pay)[ RSS](/packages/julong-pay/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (4)Used By (1)

"# pay"

install
-------

[](#install)

```
composer require julong/pay

```

use
---

[](#use)

```
$config = [
  //应用ID,您的APPID。
  'app_id' => "2018011301825418",

  //商户私钥，您的原始格式RSA私钥
  'merchant_private_key' => file_get_contents("/data/JULONG/JLSERVER/config/key/app_private_key.pem"),

  //异步通知地址
  'notify_url' => "http://工程公网访问地址/XXX/notify_url.php",

  //同步跳转
  'return_url' => "",

  //编码格式
  'charset' => "UTF-8",

  //签名方式
  'sign_type'=>"RSA2",

  //支付宝网关
  'gatewayUrl' => "https://openapi.alipay.com/gateway.do",

  //支付宝公钥,查看地址：https://openhome.alipay.com/platform/keyManage.htm 对应APPID下的支付宝公钥。
  'alipay_public_key' => file_get_contents("/data/JULONG/JLSERVER/config/key/zfb_public_key.pem"),
];

```

//setParam($subject="test",$total\_amount = "0.01",$body= "购买测试商品0.01元",$timeout\_express = "1m")

```
$alipay = new pay($config);
$content = $alipay->setParam()->toPay();
echo $content;

```

同步跳转
----

[](#同步跳转)

### 用法

[](#用法)

```
$alipay = new pay($config);    
$res = $alipay->returnUrl();  

```

### 返回

[](#返回)

```
  return [
      'out_trade_no'=>'',//商户订单号
      'trade_no'=>'',//支付宝交易号
      ];

```

异步验证
-----

[](#异步验证--)

### 用法

[](#用法-1)

```
$alipay = new pay($config);    
$res = $alipay->checkSyncPay();  

```

### 返回

[](#返回-1)

```
 return [
      'out_trade_no'=>'',//商户订单号
      'trade_no'=>'',//支付宝交易号
      'trade_status'=>'',//交易状态
    ];

```

微信支付
=====

[](#微信支付-)

用法
--

[](#用法-2)

### 支付

[](#支付)

```
$payModel = Pay::wechat()
                     ->setParam(
                      100,
                      date('YmdHis')
                     )->toPay();
 echo ($payModel);
/**
 * function setParam
 * @param string $total_fee 总金额（元）
 * @param string $out_trade_no 订单号
 * @param string $body 标题如 武汉光谷-周黑鸭
 * @param string $redirectUrl 支付完成同步跳转路径
 * @param string $timeout_express 订单过期时间如201802202359
 * @param string $fee_type 默认CNY
 * @param string $attach 附加数据如 武汉光谷分店
 * @param string $trade_type 默认MWEB
 * @param string $detail  订单详情默认空
 * @param string $device_info 设备号默认空
 * @return $this
 */

```

### 核验

[](#核验)

```
$out_trade_no = 201802212359;
$payModel = Pay::wechat()->toCheck($out_trade_no);

```

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity60

Established project with proven stability

 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.

###  Release Activity

Cadence

Every ~13 days

Total

3

Last Release

3052d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/128ded78407352457c610ec61c185573c6d2b4213a7fc247d7e780af8c6f0c84?d=identicon)[julonglu](/maintainers/julonglu)

---

Top Contributors

[![perfectlala](https://avatars.githubusercontent.com/u/24859303?v=4)](https://github.com/perfectlala "perfectlala (24 commits)")

### Embed Badge

![Health badge](/badges/julong-pay/health.svg)

```
[![Health](https://phpackages.com/badges/julong-pay/health.svg)](https://phpackages.com/packages/julong-pay)
```

###  Alternatives

[omnipay/coinbase

Coinbase driver for the Omnipay payment processing library

18570.2k1](/packages/omnipay-coinbase)

PHPackages © 2026

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