1. Go to this page and download the library: Download muhittingulap/qnbfinansbank 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/ */
muhittingulap / qnbfinansbank example snippets
$data = new \EFINANS\Component\data();
/* otomaik benzersiz UUID oluşturur. */
$uuid=$data->getUuid();
$veri = array(
"ID" => "",
"ProfileID" => "",
"UUID" => $uuid,
"IssueDate" => "",
"IssueTime" => "",
);
/* hazırlanan başlangıç datasını set ediyoruz */
$data->setStartData($veri);
$veri = array(
"ID" => 1, /* not benzersiz id si */
"Value" => "", /* not tu buraya yazınız */
);
$data->setAddNote($veri);
// e faturada zorunluluk yoktur. e arşiv için zorunlu olduğundan aşağıdaki notu eklemeniz yeterlidir.
$veri = array(
"ID" => 1,
"Value" => "Gönderim Şekli: ELEKTRONIK",
);
$data->setAddNote($veri);
$config = new \EFINANS\Config\config();
$options=$config->setUsername("CANLI_VEYA_TEST_USERNAME")
->setpassword("CANLI_VEYA_TEST_USERNAME")
->setvergiTcKimlikNo("CANLI_VEYA_TEST_VERGI_KIMLIKNO")
->setUrl("CANLI_VEYA_TEST_URL")
->getConfig();
$efatura = new \EFINANS\Libraries\efatura();
$belgeNo=uniqid();
$return= $efatura->setConfig($options)
->setStart()
->setBelgeNo($belgeNo)
->setData($qnb_data)
->setEFatura();
print $return->belgeOid; /* e faturadan bildirim sonrası dönen key */
$earsiv = new \EFINANS\Libraries\earsiv();
$return= $earsiv->setConfig($options)
->setStart()
->setSube("DFLT")
->setKasa("DFLT")
->setData($qnb_data)
->setEArsiv();
print '<pre>'; /* düzgün çıktı görseli için */
print_r($return);
$efatura = new \EFINANS\Libraries\efatura();
$ID= $efatura->setConfig($options)
->setStart()
->getFaturaNo("BASLANGIC_SERI_NO") ;
$efatura = new \EFINANS\Libraries\efatura();
$return= $efatura->setConfig($options)
->setStart()
->getEfaturaKullanicisi("VERGI_VEYA_TC_KIMLIK_NO") ;
$earsiv = new \EFINANS\Libraries\earsiv();
$ID= $earsiv->setConfig($options)
->setStart()
->setUuid($data->getUuid())
->getFaturaNo("BASLANGIC_SERI_NO");
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.