hasanilingi / iyzico
iyzico payment system laravel package
Requires
- php: >=5.4.0
- illuminate/support: ~5.0
This package is not auto-updated.
Last update: 2024-12-07 20:00:58 UTC
README
Forked From https://github.com/medyun/hkucuk-iyzico-laravel-package
Laravel PHP Framework
This package offers simply iyzico laravel bundled payment system API for PHP Framework.
1. Installation
The hasanilingi/iyzico Service Provider can be installed via Composer by requiring the
hasanilingi/iyzico
package in your project's composer.json
. (composer require hasanilingi/iyzico
)
{ "require": { "Hasanilingi/iyzico": "v1.2.0" } }
After need update composer
composer update
To use the hasanilingi/iyzico Service Provider, you must register the provider when bootstrapping your Laravel application.
Find the providers
key in your config/app.php
and register the hasanilingi/iyzico Service Provider.
'providers' => array( // ... Hasanilingi\Iyzico\IyzicoServiceProvider::class, )
Find the aliases
key in your config/app.php
and add the AWS facade alias.
'aliases' => array( // ... 'Iyzico' => Hasanilingi\Iyzico\Facades\Iyzico::class, )
2. Configuration
By default, the package uses the following environment variables to auto-configure the plugin without modification:
api_id
secret
To customize the configuration file, publish the package configuration using Artisan.
php artisan vendor:publish
Update your settings in the generated app/config/packages/hasanilingi/iyzico/config.php
configuration file.
return array( 'api_id' => 'iyzico-api-id', 'secret' => 'iyzico-secret' );
##3. Bin Check Introduction
We as iyzico know that BIN information is a valueable part of the checkout page and payment procedure. With this information the user experience on the checkout page can be enchanced greatly. This data requires careful investigation and upto date data which may be burden to handle for our customers. For this we created the BIN List Checker API for our customers.
- Request
To get the BIN info you need to make request a POST request to ; https://api.iyzico.com/bin-check with your api_id, secret and BIN number.
- Response
On the response you will get the following info ; Card Type (DEBIT CARD / CREDIT CARD), Issuer (Visa, Master , ...etc) Brand (Maximum, World, Bonus, ...etc)
###3.1. Field Explanations
In this part you will find more detailed information about the fields that you are gonna send with the request and the fields you will get on the response.
- Request Fields
- Response Fields
###3.2. Bin Check Error Codes
4. Usage
İyzico working principle is two request, two response. We want the first payment forms iyzico like this:
4.1 Checkout Usage
$data = array( "customer_language" => "tr", "mode" => "test", "external_id" => rand(), "type" => "CC.DB", "installment" => true, "amount" => 1099, "return_url" => "http://example.com/iyzicoResponse", "currency" => "TRY" ); $response = Iyzico::getForm($data); echo $response->code_snippet;
code_snippet will return to us with means of payment form iyzico.
After payment form approved will send the results to return iyzico mentioned URLs.
$data = json_decode(Input::get("json"), true); var_dump($data);
4.2 Bin Check Usage
$response = Iyzico::checkBin($binNumber); echo $response->code;