Last active
December 18, 2018 14:16
-
-
Save ahmeti/b23ee60e7a9b35a77559f80087135e11 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
composer require "ahmeti/ptt-kargo-api:@dev" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PTT_ACT_ID= | |
PTT_ACT_PASS= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
# pttApi nesnemizi .env değişkenleri ile oluşturuyoruz. | |
$pttApi = new \Ahmeti\PttKargoApi\PttKargoApi(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
# pttApi nesnemizi parametre ile oluşturuyoruz. | |
$pttApi = new \Ahmeti\PttKargoApi\PttKargoApi($pttMusteriId, $pttMusteriSifre); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$result = $pttApi->barkodSorgu('KP02168XXXXXX'); | |
if( is_array($result) ){ | |
// Başarılı | |
var_dump($result); | |
}else{ | |
// Hata (SoapFault) | |
var_dump($result); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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