PHPackages                             tinymeng/chinaums - 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. tinymeng/chinaums

ActiveLibrary[Payment Processing](/categories/payments)

tinymeng/chinaums
=================

银联商务sdk扩展包，让对接更简单

v1.0.6(2mo ago)227MITPHPPHP &gt;=7.0

Since Mar 9Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/majiameng/chinaums-php)[ Packagist](https://packagist.org/packages/tinymeng/chinaums)[ RSS](/packages/tinymeng-chinaums/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (4)Versions (8)Used By (0)

tinymeng/chinaums
=================

[](#tinymengchinaums)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/c1e4a155f6adb78f2792a110c97f54ac5db5440c7cf27c64035a856a8cf45451/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d616a69616d656e672f6368696e61756d732d7068702f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/majiameng/chinaums-php/?branch=master)[![Build Status](https://camo.githubusercontent.com/eea3f8cd2d719ce9286c19bbae8232a161f7d76d0c9dbf0394d182e19620fe2d/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d616a69616d656e672f6368696e61756d732d7068702f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/majiameng/chinaums-php/build-status/master)[![Latest Stable Version](https://camo.githubusercontent.com/f92572fab5e4e05547a5fa6cfca3e65f9553daa3f3848ed498a54ca206f0bfc6/68747470733a2f2f706f7365722e707567782e6f72672f74696e796d656e672f6368696e61756d732f762f737461626c65)](https://packagist.org/packages/tinymeng/chinaums)[![Total Downloads](https://camo.githubusercontent.com/ce1ae028b1bec72c54bfa9787af4a9fd8cc01e10414fa9af60d6a5127b379ea2/68747470733a2f2f706f7365722e707567782e6f72672f74696e796d656e672f6368696e61756d732f646f776e6c6f616473)](https://github.com/majiameng/chinaums-php/tags)[![Latest Unstable Version](https://camo.githubusercontent.com/f33f446052df34348e920c38930b6360cb71e638ca8869f9c5ecd1718e3b4c2d/68747470733a2f2f706f7365722e707567782e6f72672f74696e796d656e672f6368696e61756d732f762f756e737461626c65)](https://packagist.org/packages/tinymeng/chinaums)[![License](https://camo.githubusercontent.com/d8e1a04eb1266fc3a5cd778e41713a3f6a7f912f7bb894fd138781bb209e131e/68747470733a2f2f706f7365722e707567782e6f72672f74696e796d656e672f6368696e61756d732f6c6963656e7365)](https://github.com/majiameng/chinaums-php/blob/master/LICENSE)

Welcome Star, welcome PR ！

> If you have any questions to communicate, please post them here ： [chinaums-php](https://github.com/majiameng/chinaums-php/issues/) exchange Or Send an email

银联商务 支付 API
===========

[](#银联商务-支付-api)

银联商务sdk 和网银支付接口不一样，请注意。

- 支持微信、支付宝、银联支付的API接口
- 支持自助签约采集接口 [点击查看文档](/src/Service/Contract/README.md)
- 如想申请更低费率请联系微信：itinymeng

银联商务、微信支付、支付宝支付、云闪付
===================

[](#银联商务微信支付支付宝支付云闪付)

### payment\_method 支付方式

[](#payment_method-支付方式)

常量名描述chinaums银联商务alipay支付宝wechat微信unionpay银联云闪付支付目前直接内置支持以下快捷方式支付方法，对应的支付 method 如下：

支付方式
payment\_method支付类型
method说明参数返回值银联商务scan扫码支付（C扫B 主扫）array $orderarray银联商务pos刷卡支付（B扫C 被扫）array $orderarray微信、支付宝、银联云闪付mp公众号支付array $orderarray微信、支付宝、银联云闪付h5H5 支付array $orderarray微信、支付宝、银联云闪付appAPP 支付array $orderarray微信、支付宝、银联云闪付mini小程序支付array $orderarray使用事例

```
$paymentMethod = 'wechat'; //微信支付
$method = 'mini'; // 小程序支付

$config = []; //配置文件
$data = []; //支付参数
$app = Factory::$paymentMethod($config)->$method();
$response = $app->request($data);

```

运行要求
----

[](#运行要求)

- PHP 7.0版本以上

安装
--

[](#安装)

```
composer require tinymeng/chinaums -vvv
```

使用示例
----

[](#使用示例)

更多示例可查看[example](example/Wechat/)目录下的文件

```
