Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Add package to your composer.json file
"iyzico/iyzipay-laravel": "dev-master", and run
Add service provider to your
providers array in
This package uses an
IyzipayLaravel facade for creating and managing subscription plans for your Payable models easily. Add it to your
aliases array in
'IyzipayLaravel' => Iyzico\IyzipayLaravel\IyzipayLaravelFacade::class
Publish configuration file with
$ php artisan vendor:publish --provider="Iyzico\IyzipayLaravel\IyzipayLaravelServiceProvider"
You should modify
config/iyzipay.php file and map your billable model. Think billable model as your customers. This is initially mapped to your
App/User model, but you may change this to
'billableModel' => 'App\User'
You must be sure that you have environment variables below, and be sure about they are correct credentials:
IYZIPAY_BASE_URL=BASE_URL_HERE IYZIPAY_API_KEY=YOUR_KEY_HERE IYZIPAY_SECRET_KEY=YOUR_SECRET_KEY_HERE
At last, you must migrate package tables to your project.
$ php artisan migrate