Thanks to this library, you can create cargo integrated with Yurtiçi Kargo, question the cargo status and cancel your cargo.
Example Codes »
Report error · suggestion/request
Thanks to this library, you can create cargo integrated with Yurtiçi Kargo, question the cargo status and cancel your cargo.
You need to apply for an integration for the web service user name and web service password required for Domestic Cargo Integration. You can access the integration information, parameters and examples by taking the integration document from the Yurtiçi Kargo marketing manager.
In order for the codes to operate smoothly, the server's number 80 and plug -in such as sockets, OpenSSL, SOAP, Curl must be open.
wsUserName : web service user name
wsPassword : Web Service Password
wsLanguage : Web Service Language Option (EXAMPLE: 'TR')
cleanResult : Makes the results of the results more simple. (True/False) (Default: True)
testMode : Test Mode (True/False)
Note: The above parameters apply to all examples.
cargoKey : Cargo key (must be unique for every shipment)
invoiceKey : Invoice Switch (must be unique for each post)
receiverCustName : Receiver name (min 5 characters must contain at least 4 letters.)
receiverAddress : Receiver Address (Min 5 Max 200 characters. Provincial and district information should not be sent in this area when sent in the fields of Cityname and Townname.)
receiverPhone1 : Receiver Telephone-1 (It should consist of 10 numbers with the field code).)
<?php
require_once " ../src/class.php " ;
$ yurtici = new yurticiKargo ( array (
' wsUserName ' => " {wsUserName} " ,
' wsPassword ' => " {wsPassword} " ,
' wsLanguage ' => " {wsLanguage} " , // Default: TR
' cleanResult ' => true , // Default: true [true/false]
' testMode ' => true // Default: false [true/false]
));
$ response = $ yurtici -> createShipment ( array (
" cargoKey " => " 123456 " ,
' invoiceKey ' => " 654321 " ,
' receiverCustName ' => " John Doe " ,
' receiverAddress ' => " Lorem Ipsum is simply dummy text of the printing and typesetting industry. " ,
' cityName ' => " City " ,
' townName ' => " Town " ,
' receiverPhone1 ' => " 05554443322 " ,
' emailAddress ' => " [email protected] " ,
' orgReceiverCustId ' => ' 9999 '
));
?> Array
(
[outFlag] => 0
[outResult] => Başarılı
[count] => 1
[jobId] => 2198077
[shippingOrderDetailVO] => Array
(
[cargoKey] => 123456
[invoiceKey] => 654321
)
)
keys : Shipping/Invoice Key
keyType : Determine the type of keys specified in the keys parameter. 0 - Shipping Key / 1 - Invoice Switch
addHistoricalData : It should be specified for reporting the transport movements of the shipment.
onlyTracking : Allows you to report the follow -up link only.
<?php
require_once " ../src/class.php " ;
$ yurtici = new yurticiKargo ( array (
' wsUserName ' => " {wsUserName} " ,
' wsPassword ' => " {wsPassword} " ,
' wsLanguage ' => " {wsLanguage} " , // Default: TR
' cleanResult ' => true , // Default: true [true/false]
' testMode ' => true // Default: false [true/false]
));
$ response = $ yurtici -> queryShipment ( ' 123456 ' , 0 , false , true );
?> Array
(
[outFlag] => 0
[outResult] => Başarılı
[count] => 1
[senderCustId] => 1010954
[shippingDeliveryDetailVO] => Array
(
[cargoKey] => 123456
[invoiceKey] => 654321
[jobId] => 2198077
[operationCode] => 0
[operationMessage] => Kargo İşlem Görmemiş.
[operationStatus] => NOP
)
)
cargoKeys : Shipping Key
<?php
require_once " ../src/class.php " ;
$ yurtici = new yurticiKargo ( array (
' wsUserName ' => " {wsUserName} " ,
' wsPassword ' => " {wsPassword} " ,
' wsLanguage ' => " {wsLanguage} " , // Default: TR
' cleanResult ' => true , // Default: true [true/false]
' testMode ' => true // Default: false [true/false]
));
$ response = $ yurtici -> cancelShipment ( ' 123456 ' );
?> Array
(
[outFlag] => 0
[outResult] => Başarılı
[count] => 1
[senderCustId] => 1010954
[shippingCancelDetailVO] => Array
(
[cargoKey] => 123456
[docId] => 0
[invoiceKey] => 654321
[jobId] => 2198077
[operationCode] => 3
[operationMessage] => Verisi İptal Edilmiştir.Kargo Çıkışı Engellendi.
[operationStatus] => CNL
)
)
Project Connection: https://github.com/beratkrdr/yurtizi-kargo-entegration-php