A Laravel/PHP SDK for the Ezypay v2 API. Take a look at contributing.md to see a to do list.
$ composer require harmonic/ezypay
php artisan vendor:publish --provider="harmonic\Ezypay"
Optionally add Ezypay alias tp app.php config file:
'aliases' => [
...
'Ezypay' => harmonic\Ezypay\Facades\Ezypay::class,
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()
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.
Please see the changelog for more information on what has changed recently.
Add a .env file containing your Ezypay details, then:
$ vendor/bin/phpunit
Please see contributing.md for details and a todolist.
If you discover any security related issues, please email craig@harmonic.com.au instead of using the issue tracker.
MIT. Please see the license file for more information.