lyenrowe / omnipay-alipay
Alipay gateway for Omnipay payment processing library
Requires
- omnipay/common: v3.0-alpha.1
Requires (Dev)
- omnipay/tests: v3.0-alpha.1
- squizlabs/php_codesniffer: 3.*
- dev-master
- v3.0.6
- v3.0.5
- v3.0.4
- v3.0.3
- v3.0.2
- v3.0.1
- v3.0.0
- v2.3.5
- v2.3.4
- v2.3.3
- v2.3.2
- v2.3.1
- v2.3.0
- v2.1.0
- v2.0.10
- v2.0.9
- v2.0.8
- v2.0.7
- v2.0.5
- v2.0.4
- v2.0.3
- v2.0.2
- v2.0.1
- v2.0.0
- v1.4.13
- v1.4.12
- v1.4.11
- v1.4.10
- v1.4.9
- v1.4.8
- v1.4.7
- v1.4.6
- v1.4.5
- v1.4.0
- v1.3.0
- v1.2.0
- v1.1.0
- v1.0.4
- v1.0.3
- v1.0.2
- v1.0.1
- v1.0.0
- v0.9.3
- v0.9.2
- v0.9.1
- v0.9.0
- v0.8.4
- v0.8.3
- v0.8.2
- v0.8.1
- v0.8.0
- v0.7.1
- v0.7.0
- v0.6.1
- v0.6.0
- dev-php71
- dev-patch-1
- dev-legacy
This package is auto-updated.
Last update: 2024-11-07 16:52:12 UTC
README
Alipay driver for the Omnipay PHP payment processing library
Omnipay is a framework agnostic, multi-gateway payment processing library for PHP 5.6. This package implements Alipay support for Omnipay.
this lib now base on omnipay common v3.0-alpha.1 to be able stay on php 5.6
Installation
Omnipay is installed via Composer. To install, simply add it
to your composer.json
file:
"lyenrowe/omnipay-alipay": "^3.0",
And run composer to update your dependencies:
$ composer update -vvv
Basic Usage
The following gateways are provided by this package:
Usage
Purchase (购买)
/** * @var AopAppGateway $gateway */ $gateway = Omnipay::create('Alipay_AopPage'); $gateway->setSignType('RSA2'); // RSA/RSA2/MD5 $gateway->setAppId('the_app_id'); $gateway->setPrivateKey('the_app_private_key'); $gateway->setAlipayPublicKey('the_alipay_public_key'); $gateway->setReturnUrl('https://www.example.com/return'); $gateway->setNotifyUrl('https://www.example.com/notify'); /** * @var AopTradePagePayResponse $response */ $response = $gateway->purchase()->setBizContent([ 'subject' => 'test', 'out_trade_no' => date('YmdHis') . mt_rand(1000, 9999), 'total_amount' => '0.01', 'product_code' => 'FAST_INSTANT_TRADE_PAY', ])->send(); $url = $response->getRedirectUrl();
For general usage instructions, please see the main Omnipay repository.
Related
Support
If you are having general issues with Omnipay, we suggest posting on Stack Overflow. Be sure to add the omnipay tag so it can be easily found.
If you want to keep up to date with release anouncements, discuss ideas for the project, or ask more detailed questions, there is also a mailing list which you can subscribe to.
If you believe you have found a bug, please report it using the GitHub issue tracker, or better yet, fork the library and submit a pull request.