# Omnipay
**An easy to use, consistent payment processing library for PHP 5.3+**
[![Build Status](https://travis-ci.org/thephpleague/omnipay-common.png?branch=master)](https://travis-ci.org/thephpleague/omnipay-common)
[![Latest Stable Version](https://poser.pugx.org/omnipay/omnipay/version)](https://packagist.org/packages/omnipay/omnipay)
[![Total Downloads](https://poser.pugx.org/omnipay/omnipay/d/total)](https://packagist.org/packages/omnipay/omnipay)
Omnipay is a payment processing library for PHP. It has been designed based on
ideas from [Active Merchant](http://activemerchant.org/), plus experience implementing
dozens of gateways for [CI Merchant]. It has a clear and consistent API,
is fully unit tested, and even comes with an example application to get you started.
**Why use Omnipay instead of a gateway's official PHP package/example code?**
* Because you can learn one API and use it in multiple projects using different payment gateways
* Because if you need to change payment gateways you won't need to rewrite your code
* Because most official PHP payment gateway libraries are a mess
* Because most payment gateways have exceptionally poor documentation
* Because you are writing a shopping cart and need to support multiple gateways
**Important Note: Compatibility with Symfony 3 Event Dispatcher**
If you are using Symfony 3 (or Symfony 3 components), please note that Omnipay 2.x still relies on Guzzle3, which in turn depends on symfony/event-dispatcher 2.x. This conflicts with Symfony 3 (standard install), so cannot be installed. Development for Omnipay 3.x is still in progress at the moment.
If you are just using the Symfony 3 components (eg. stand-alone or Silex/Laravel etc), you could try to force the install of symfony/event-dispatcher:^2.8, which is compatible with both Symfony 3 components and Guzzle 3.
```
composer require symfony/event-dispatcher:^2.8
```
**Please do not submit any more issues or pull requests for updating Omnipay from Guzzle 3 to GuzzleHttp. The update is going to happen in Omnipay version 3.0 which is not yet ready for release.**
## TL;DR
Just want to see some code?
```php
use Omnipay\Omnipay;
$gateway = Omnipay::create('Stripe');
$gateway->setApiKey('abc123');
$formData = array('number' => '4242424242424242', 'expiryMonth' => '6', 'expiryYear' => '2016', 'cvv' => '123');
$response = $gateway->purchase(array('amount' => '10.00', 'currency' => 'USD', 'card' => $formData))->send();
if ($response->isRedirect()) {
// redirect to offsite payment gateway
$response->redirect();
} elseif ($response->isSuccessful()) {
// payment was successful: update database
print_r($response);
} else {
// payment failed: display message to customer
echo $response->getMessage();
}
```
As you can see, Omnipay has a consistent, well thought out API. We try to abstract as much
as possible the differences between the various payments gateways.
## Package Layout
Omnipay is a collection of packages which all depend on the
[omnipay/common](https://github.com/thephpleague/omnipay-common) package to provide
a consistent interface. There are no dependencies on official payment gateway PHP packages -
we prefer to work with the HTTP API directly. Under the hood, we use the popular and powerful
[Guzzle](http://guzzlephp.org/) library to make HTTP requests.
New gateways can be created by cloning the layout of an existing package. When choosing a
name for your package, please don't use the `omnipay` vendor prefix, as this implies that
it is officially supported. You should use your own username as the vendor prefix, and prepend
`omnipay-` to the package name to make it clear that your package works with Omnipay.
For example, if your GitHub username was `santa`, and you were implementing the `giftpay`
payment library, a good name for your composer package would be `santa/omnipay-giftpay`.
## Installation
Omnipay is installed via [Composer](https://getcomposer.org/). For most uses, you will need to require an individual gateway:
```
composer require omnipay/paypal:~2.0
```
To install all officially supported gateways:
```
composer require omnipay/omnipay:~2.0
```
> This will require **ALL** ~25 Omnipay gateways and is generally discouraged.
## Payment Gateways
All payment gateways must implement [GatewayInterface](https://github.com/thephpleague/omnipay-common/blob/master/src/Omnipay/Common/GatewayInterface.php), and will usually
extend [AbstractGateway](https://github.com/thephpleague/omnipay-common/blob/master/src/Omnipay/Common/AbstractGateway.php) for basic functionality.
The following gateways are available:
Gateway | Composer Package | Maintainer
--- | --- | ---
[2Checkout](https://github.com/thephpleague/omnipay-2checkout) | omnipay/2checkout | [Omnipay](https://github.com/thephpleague/omnipay)
[2Checkout Improved](https://github.com/collizo4sky/omnipay-2checkout) | collizo4sky/omnipay-2checkout | [Agbonghama Collins](https://github.com/collizo4sky)
[Agms](https://github.com/agmscode/omnipay-agms) | agmscode/omnipay-agms | [Maanas Royy](https://github.com/maanas)
[Alipay(Global)](https://github.com/lokielse/omnipay-global-alipay) | lokielse/omnipay-global-alipay | [Loki Else](https://github.com/lokielse)
[Alipay](https://github.com/lokielse/omnipay-alipay) | lokielse/omnipay-alipay | [Loki Else](https://github.com/lokielse)
[Allied Wallet](https://github.com/delatbabel/omnipay-alliedwallet) | delatbabel/omnipay-alliedwallet | [Del](https://github.com/delatbabel)
[Authorize.Net](https://github.com/thephpleague/omnipay-authorizenet) | omnipay/authorizenet | [Jason Judge](https://github.com/judgej)
[Barclays ePDQ](https://github.com/digitickets/omnipay-barclays-epdq) | digitickets/omnipay-barclays-epdq | [DigiTickets](https://github.com/digitickets)
[Beanstream](https://github.com/lemonstand/omnipay-beanstream) | lemonstand/omnipay-beanstream | [LemonStand](https://github.com/lemonstand)
[BKM Express](https://github.com/yasinkuyu/omnipay-bkm) | yasinkuyu/omnipay-bkm | [Yasin Kuyu](https://github.com/yasinkuyu)
[Braintree](https://github.com/thephpleague/omnipay-braintree) | omnipay/braintree | [Omnipay](https://github.com/thephpleague/omnipay)
[Buckaroo](https://github.com/thephpleague/omnipay-buckaroo) | omnipay/buckaroo | [Omnipay](https://github.com/thephpleague/omnipay)
[CardGate](https://github.com/cardgate/omnipay-cardgate) | cardgate/omnipay-cardgate | [CardGate](https://github.com/cardgate)
[CardSave](https://github.com/thephpleague/omnipay-cardsave) | omnipay/cardsave | [Omnipay](https://github.com/thephpleague/omnipay)
[Checkout.com](https://github.com/fotografde/omnipay-checkoutcom) | fotografde/checkoutcom | [fotograf.de](https://github.com/fotografde)
[Coinbase](https://github.com/thephpleague/omnipay-coinbase) | omnipay/coinbase | [Omnipay](https://github.com/thephpleague/omnipay)
[CoinGate](https://github.com/coingate/omnipay-coingate) | coingate/omnipay-coingate | [CoinGate](https://github.com/coingate)
[Creditcall](https://github.com/meebio/omnipay-creditcall) | meebio/omnipay-creditcall | [John Jablonski](https://github.com/jan-j)
[Cybersource](https://github.com/dioscouri/omnipay-cybersource) | dioscouri/omnipay-cybersource | [Dioscouri Design](https://github.com/dioscouri)
[Cybersource SOAP](https://github.com/Klinche/omnipay-cybersource-soap) | dabsquared/omnipay-cybersource-soap | [DABSquared](https://github.com/DABSquared)
[DataCash](https://github.com/digitickets/omnipay-datacash) | digitickets/omnipay-datacash | [DigiTickets](https://github.com/digitickets)
[Dummy](https://github.com/thephpleague/omnipay-dummy) | omnipay/dummy | [Del](https://github.com/delatbabel)
[ecoPayz](https://github.com/dercoder/omnipay-ecopayz) | dercoder/omnipay-ecopayz | [Alexander Fedra](https://github.com/dercoder)
[EgopayRu](https://github.com/pinguinjkeke/omnipay-egopaymentru) | pinguinjkeke/omnipay-egopaymentru | [Alexander Avakov](https://github.com/pinguinjkeke)
[Elavon](https://github.com/
没有合适的资源?快使用搜索试试~ 我知道了~
whmcs分销中心.zip
共2000个文件
php:2584个
js:453个
txt:344个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 118 浏览量
2021-11-06
18:47:13
上传
评论
收藏 15.32MB ZIP 举报
温馨提示
whmcs分销中心
资源推荐
资源详情
资源评论
收起资源包目录
whmcs分销中心.zip (2000个子文件)
phpcs.bat 699B
CNAME 25B
CNAME 25B
bootstrap-switch.coffee 17KB
bootstrap-switch.coffee 17KB
gulpfile.coffee 7KB
gulpfile.coffee 7KB
bootstrap-switch.tests.coffee 3KB
bootstrap-switch.tests.coffee 3KB
main.coffee 2KB
main.coffee 2KB
ca-certificates.crt 248KB
components-rounded.css 932KB
components-rounded.css 932KB
bootstrap.css 181KB
bootstrap.css 181KB
bootstrap.min.css 115KB
bootstrap.min.css 115KB
bootstrap.min.css 101KB
mg-style.css 59KB
select2.css 40KB
skin.min.css 37KB
skin.min.css 37KB
font-awesome.css 35KB
font-awesome.css 35KB
skin.ie7.min.css 34KB
skin.ie7.min.css 34KB
jquery-ui.min.css 30KB
jquery-ui.min.css 30KB
bootstrap-switch.css 24KB
bootstrap-switch.css 24KB
bootstrap-switch.min.css 20KB
bootstrap-switch.min.css 20KB
bootstrap-responsive.min.css 16KB
simple-line-icons.css 16KB
simple-line-icons.css 16KB
simplemde.css 15KB
select2.min.css 15KB
select2.min.css 15KB
uniform.default.css 13KB
uniform.default.css 13KB
nv.d3.css 13KB
simplemde.min.css 11KB
bootstrap-datetimepicker.css 9KB
bootstrap-datetimepicker.css 9KB
jquery.dataTables.css 8KB
jquery.dataTables.css 8KB
bootstrap-datetimepicker.min.css 8KB
bootstrap-datetimepicker.min.css 8KB
bootstrap-switch.css 7KB
bootstrap-switch.css 7KB
simplemde.css 7KB
bootstrap-switch.min.css 6KB
bootstrap-switch.min.css 6KB
visualblocks.css 5KB
visualblocks.css 5KB
mg-style.css 4KB
datatables.min.css 4KB
datatables.min.css 4KB
content.min.css 3KB
content.min.css 3KB
resellers-center.css 3KB
content.inline.min.css 3KB
content.inline.min.css 3KB
highlight.css 3KB
highlight.css 3KB
highlight.css 3KB
highlight.css 3KB
bootstrap-datetimepicker-standalone.css 2KB
bootstrap-datetimepicker-standalone.css 2KB
prism.css 2KB
prism.css 2KB
onoffswitch.css 2KB
onoffswitch.css 2KB
bootstrap-toggle.css 2KB
bootstrap-toggle.css 2KB
bootstrap2-toggle.css 2KB
stylesheet.css 2KB
bootstrap-toggle.min.css 2KB
bootstrap2-toggle.min.css 2KB
MGStyle.css 1KB
MGStyle.css 1KB
MGClientAreaStyle.css 1KB
MGClientAreaStyle.css 1KB
style.css 1KB
main.css 1KB
main.css 1KB
stripe.css 317B
dataTables.lengthLinks.css 49B
dataTables.lengthLinks.css 49B
dashboard.html.dist 4KB
file.html.dist 2KB
directory.html.dist 2KB
mocked_class.tpl.dist 2KB
phpunit.xml.dist 1KB
phpunit.xml.dist 1KB
TestCaseMethod.tpl.dist 1KB
phpunit.xml.dist 948B
phpunit.xml.dist 931B
phpunit.xml.dist 929B
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论
熊IT
- 粉丝: 59
- 资源: 65
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功