PHP code example of farukcam / kuveytturk
1. Go to this page and download the library: Download farukcam/kuveytturk library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
farukcam / kuveytturk example snippets
return [
// ...
'providers' => [
// ...
farukcam\Kuveytturk\KuveytturkServiceProvider::class
],
// ...
'aliases' => [
// ...
'Kuveytturk' => farukcam\Kuveytturk\Facades\Kuveytturk::class
],
);
return [
"Type" => "Sale",
"APIVersion" => "1.0.0",
"ApiUrl" => "https://boa.kuveytturk.com.tr/sanalposservice/Home/ThreeDModelPayGate", // Test API url : https://boatest.kuveytturk.com.tr/boa.virtualpos.services/Home/ThreeDModelPayGate
"CustomerId" => "Müşteri Numarası", // Test Müşteri Numarası : 400235
"CurrencyCode" => "0949", // Para birimi TL 0949
"MerchantId" => "Mağaza Kodu", // Test Magaza Kodu : 496
"OkUrl" => "Basarili sonuç alinirsa, yönledirelecek sayfa",
"FailUrl" => "Basarisiz sonuç alinirsa, yönledirelecek sayfa",
"UserName" => "Web Yönetim ekranlarindan olusturulan api rollü kullanici", // Test API Kullanıcısı : apiuser1
"Password" => "Web Yönetim ekranlarindan olusturulan api rollü kullanici sifresi", // Test API Kullanıcı Şifresi : api123
"TransactionSecurity" => "3" // 3d Secure = 3 , 3d'siz = 1
];
use Kuveytturk;
public function index()
{
$kuveytturk = Kuveytturk::setName('Faruk Çam')
->setCardNumber(4033602562020327)
->setCardExpireDateMonth(01)
->setCardExpireDateYear(30)
->setCardCvv2(861)
->setOrderId(1)
->setAmount(100)
->pay();
}
config/app.php
code
php artisan vendor:publish
config/kuveytturk.php