harmonic/ezypay
Composer 安装命令:
composer require harmonic/ezypay
包简介
A PHP SDK for the Ezypay v2.0 API
README 文档
README
A Laravel/PHP SDK for the Ezypay v2 API. Take a look at contributing.md to see a to do list.
Installation
Via Composer
$ composer require harmonic/ezypay
Publish config file
php artisan vendor:publish --provider="harmonic\Ezypay"
Alias
Optionally add Ezypay alias tp app.php config file:
'aliases' => [ ... 'Ezypay' => harmonic\Ezypay\Facades\Ezypay::class,
Usage
Add Ezypay credentials to your .env file
EZY_PAY_WEBHOOK_CLIENT_KEY=YOUR_WEBHOOK_CLIENT_KEY
EZY_PAY_API_URL=https://api-global.ezypay.com
EZY_PAY_USER=your@email.com
EZY_PAY_PASSWORD=YOUR_PASSWORD
EZYPAY_INTEGRATOR_ID=YOUR_INTEGRATOR_ID
EZY_PAY_API_CLIENT_ID=YOUR_CLIENT_ID
EZY_PAY_CLIENT_SECRET=YOUR_SECRET
EZY_PAY_MERCHANT_ID=YOUR_MERCHANT_ID
All Ezypay API methods are availble via the Ezypay facade.
Simply call
Ezypay::methodName
Where methodName is any method from https://developer.ezypay.com/reference eg. createCustomer(), getCustomers()
Testing Facade
There is a testing facade available for your tests that will return fake data. In your tests:
use harmonic\Ezypay\Facades\Ezypay; ... Ezypay::fake();
Then use Ezypay facade as normal.
Change log
Please see the changelog for more information on what has changed recently.
Tests
Add a .env file containing your Ezypay details, then:
$ vendor/bin/phpunit
Contributing
Please see contributing.md for details and a todolist.
Security
If you discover any security related issues, please email craig@harmonic.com.au instead of using the issue tracker.
Credits
License
MIT. Please see the license file for more information.
统计信息
- 总下载量: 370
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-07-15