PHPackages                             xorpay/sdk - 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. xorpay/sdk

ActiveLibrary[Payment Processing](/categories/payments)

xorpay/sdk
==========

The Xorpay PHP SDK

v0.1.0(6y ago)23201MITPHP

Since Aug 13Pushed 6y ago1 watchersCompare

[ Source](https://github.com/xiaohuilam/xorpay-sdk)[ Packagist](https://packagist.org/packages/xorpay/sdk)[ RSS](/packages/xorpay-sdk/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (4)Dependencies (7)Versions (5)Used By (0)

Xorpay SDK
==========

[](#xorpay-sdk)

[XorPay](https://xorpay.com?r=register)是提供个人微信、支付宝收款的在线工具，费率从0.9%~1.38%。[了解一下](https://xorpay.com?r=register)

[![Build Status](https://camo.githubusercontent.com/f050a450ec1ef8c8b173446a9d753d38e35e515e2a51182011e0677a0189447f/68747470733a2f2f7472617669732d63692e6f72672f7869616f6875696c616d2f786f727061792d73646b2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/xiaohuilam/xorpay-sdk)

安装
--

[](#安装)

**依赖**

- php 5.6 +
- laravel 5.0 +

```
composer require xorpay/sdk
```

**如果Laravel低于5.5**, 需要手工添加服务提供者和别名

打开 `config/app.php`

```
'providers' => [
    //...
    Xorpay\XorpayServiceProvider::class,
],
'aliases' => [
    //...
    'Xorpay' => Xorpay\Facade::class,
],
```

配置
--

[](#配置)

添加 env

```
XORPAY_AID=#你的AID
XORPAY_APP_SECRET=#你的KEY
```

使用
--

[](#使用)

**发起支付**

```
app('xorpay')->requestPay([
    'name' => '订单名字',
    'price' => 200,
    'order_id' => 12,
    'order_uid' => 1,
    'notify_url' => route('pay.notify', $order), //回调路由
], 'native')
```

**回调**

```
// 当验签不通过，自动报失败，而不会执行成功的逻辑
app('xorpay')->notifyOrder(function ($order_id) {
    $order = Order::findOrFail($order_id);
    $order->status = Order::STATUS_PAID;
    $order->save();
})
```

授权
--

[](#授权)

MIT

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 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 ~14 days

Total

4

Last Release

2423d ago

### Community

Maintainers

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

---

Top Contributors

[![xiaohuilam](https://avatars.githubusercontent.com/u/6964962?v=4)](https://github.com/xiaohuilam "xiaohuilam (14 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/xorpay-sdk/health.svg)

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

###  Alternatives

[sebdesign/laravel-viva-payments

A Laravel package for integrating the Viva Payments gateway

4845.9k](/packages/sebdesign-laravel-viva-payments)[musahmusah/laravel-multipayment-gateways

A Laravel Package that makes implementation of multiple payment Gateways endpoints and webhooks seamless

852.2k1](/packages/musahmusah-laravel-multipayment-gateways)[karson/mpesa-php-sdk

172.2k](/packages/karson-mpesa-php-sdk)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[henryejemuta/laravel-monnify

A laravel package to seamlessly integrate monnify api within your laravel application

132.1k](/packages/henryejemuta-laravel-monnify)

PHPackages © 2026

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