Skip to content

Instantly share code, notes, and snippets.

@ahmeti ahmeti/PTTKArgoApi-1.php
Last active Dec 18, 2018

Embed
What would you like to do?
composer require "ahmeti/ptt-kargo-api:@dev"
PTT_ACT_ID=
PTT_ACT_PASS=
<?php
# pttApi nesnemizi .env değişkenleri ile oluşturuyoruz.
$pttApi = new \Ahmeti\PttKargoApi\PttKargoApi();
<?php
# pttApi nesnemizi parametre ile oluşturuyoruz.
$pttApi = new \Ahmeti\PttKargoApi\PttKargoApi($pttMusteriId, $pttMusteriSifre);
<?php
$result = $pttApi->barkodSorgu('KP02168XXXXXX');
if( is_array($result) ){
// Başarılı
var_dump($result);
}else{
// Hata (SoapFault)
var_dump($result);
}
<?php
$result = $pttApi->gonderiHareketIslemTarihiSorgu('2018-03-01');
if( is_array($result) ){
foreach( $result['dongu'] as $item ){
// Başarılı
var_dump($item);
}
}else{
// Hata (SoapFault)
var_dump($result);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.