📁 PHP Dosya Yöneticisi
/
/
home
/
demodesigncom
/
e-ticaretv12.demodesign.com.tr
/
eklentiler
/
mng-kargo
📝
mng-class.php
← Geri Dön
<?php $wsdl = "https://service.mngkargo.com.tr/tservis/musterikargosiparis.asmx?WSDL"; class mng{ function SiparisGirisiDetayliV3( $k ) { global $mnguser; $data = '<?xml version="1.0" encoding="utf-8"?> <soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"> <soap12:Body> <SiparisGirisiDetayliV3 xmlns="http://tempuri.org/"> <pChIrsaliyeNo></pChIrsaliyeNo> <pChBarkod></pChBarkod> <pChIcerik></pChIcerik> <pGonderiHizmetSekli>'.$k['pGonderiHizmetSekli'].'</pGonderiHizmetSekli> <pTeslimSekli>'.$k['pTeslimSekli'].'</pTeslimSekli> <pFlAlSms>'.$k['pFlAlSms'].'</pFlAlSms> <pFlGnSms>'.$k['pFlGnSms'].'</pFlGnSms> <pKargoParcaList>'.$k['pKargoParcaList'].'</pKargoParcaList> <pAliciMusteriMngNo></pAliciMusteriMngNo> <pAliciMusteriBayiNo></pAliciMusteriBayiNo> <pAliciMusteriAdi>'.$k['pAliciMusteriAdi'].'</pAliciMusteriAdi> <pChSiparisNo>'.$k['pChSiparisNo'].'</pChSiparisNo> <pLuOdemeSekli>'.$k['pLuOdemeSekli'].'</pLuOdemeSekli> <pFlAdresFarkli>'.$k['pFlAdresFarkli'].'</pFlAdresFarkli> <pChIl>'.$k['pChIl'].'</pChIl> <pChIlce>'.$k['pChIlce'].'</pChIlce> <pChAdres>'.$k['pChAdres'].'</pChAdres> <pChSemt></pChSemt> <pChMahalle></pChMahalle> <pChMeydanBulvar></pChMeydanBulvar> <pChCadde></pChCadde> <pChSokak></pChSokak> <pChTelEv></pChTelEv> <pChTelCep>'.$k['pChTelCep'].'</pChTelCep> <pChTelIs></pChTelIs> <pChFax></pChFax> <pChEmail>'.$k['pChEmail'].'</pChEmail> <pChVergiDairesi></pChVergiDairesi> <pChVergiNumarasi></pChVergiNumarasi> <pFlKapidaOdeme>'.$k['pFlKapidaOdeme'].'</pFlKapidaOdeme> <pMalBedeliOdemeSekli></pMalBedeliOdemeSekli> <pPlatformKisaAdi></pPlatformKisaAdi> <pPlatformSatisKodu></pPlatformSatisKodu> <pKullaniciAdi>'.$mnguser['user'].'</pKullaniciAdi> <pSifre>'.$mnguser['pass'].'</pSifre> </SiparisGirisiDetayliV3> </soap12:Body> </soap12:Envelope>'; $response = $this->curl_post($data); $return = array(); if ( $response['soapBody']['SiparisGirisiDetayliV3Response']['SiparisGirisiDetayliV3Result'] == "1" ) { $return = array( 'success' => 1, 'sipNo' => $k['pChSiparisNo'] ); } else { $return = array( 'success' => 0 ); } return $return; } function FaturaSiparisListesi($params){ $req='<?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <FaturaSiparisListesi xmlns="http://tempuri.org/"> <pSiparisNo>'.$params['pSiparisNo'].'</pSiparisNo> <pKullaniciAdi>'.$params['pKullaniciAdi'].'</pKullaniciAdi> <pSifre>'.$params['pSifre'].'</pSifre> </FaturaSiparisListesi> </soap:Body> </soap:Envelope>'; $response=$this->curl_post($req); return $response['soapBody']['FaturaSiparisListesiResponse']['FaturaSiparisListesiResult']['diffgrdiffgram']['NewDataSet']['FaturaSiparisListesi']; } function KargoBilgileriByReferans( $k ){ global $mnguser; $req='<?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <KargoBilgileriByReferans xmlns="http://tempuri.org/"> <pMusteriNo>'.$mnguser['user'].'</pMusteriNo> <pSifre>'.$mnguser['pass'].'</pSifre> <pSiparisNo>'.$k['pSiparisNo'].'</pSiparisNo> <pGonderiNo></pGonderiNo> <pFaturaSeri></pFaturaSeri> <pFaturaNo></pFaturaNo> <pIrsaliyeNo></pIrsaliyeNo> <pEFaturaNo></pEFaturaNo> <pRaporType></pRaporType> </KargoBilgileriByReferans> </soap:Body> </soap:Envelope>'; $response = $this->curl_post($req); // return $response['soapBody']['KargoBilgileriByReferansResponse']['KargoBilgileriByReferansResult']['diffgrdiffgram']['NewDataSet']['Table1']; return $response['soapBody']['KargoBilgileriByReferansResponse']['KargoBilgileriByReferansResult']['diffgrdiffgram']['NewDataSet']['Table1']['KARGO_STATU_ACIKLAMA']; } function FaturaSiparisListesiByTarih($params){ $req='<?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <FaturaSiparisListesiByTarih xmlns="http://tempuri.org/"> <pKullaniciAdi>'.$params['pKullaniciAdi'].'</pKullaniciAdi> <pSiparisTarih>'.$params['pSiparisTarih'].'</pSiparisTarih> <pSifre>'.$params['pSifre'].'</pSifre> </FaturaSiparisListesiByTarih> </soap:Body> </soap:Envelope>'; $response=$this->curl_post($req); return $response['soapBody']['FaturaSiparisListesiByTarihResponse']['FaturaSiparisListesiByTarihResult']['diffgrdiffgram']['NewDataSet']['FaturaSiparisListesi']; } function KargoBilgileriByTarih($params){ $req='<?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <KargoBilgileriByTarih xmlns="http://tempuri.org/"> <pMusteriNo>'.$params['pMusteriNo'].'</pMusteriNo> <pSifre>'.$params['pSifre'].'</pSifre> <pTarih>'.$params['pTarih'].'</pTarih> <pRaporType>'.$params['pRaporType'].'</pRaporType> <pFlAltfirma>'.$params['pFlAltfirma'].'</pFlAltfirma> </KargoBilgileriByTarih> </soap:Body> </soap:Envelope>'; $response=$this->curl_post($req); print_r($response); return $response; } function KargoTakipByReferans($params){ $req='<?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <KargoTakipByReferans xmlns="http://tempuri.org/"> <pKullanici>'.$params['pKullanici'].'</pKullanici> <pSifre>'.$params['pSifre'].'</pSifre> <pReferansId>'.$params['pReferansId'].'</pReferansId> </KargoTakipByReferans> </soap:Body> </soap:Envelope>'; $response=$this->curl_post($req); return $response['soapBody']['KargoTakipByReferansResponse']['KargoTakipByReferansResult']['diffgrdiffgram']; } function curl_post($data){ global $wsdl; $header = array( "Content-type: text/xml;charset=\"utf-8\"", "Accept: text/xml", "Cache-Control: no-cache", "Pragma: no-cache", "Content-length: ".strlen($data), ); $soap_do = curl_init(); curl_setopt($soap_do, CURLOPT_URL, $wsdl ); curl_setopt($soap_do, CURLOPT_CONNECTTIMEOUT, 10); curl_setopt($soap_do, CURLOPT_TIMEOUT, 10); curl_setopt($soap_do, CURLOPT_RETURNTRANSFER, true ); curl_setopt($soap_do, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($soap_do, CURLOPT_SSL_VERIFYHOST, false); curl_setopt($soap_do, CURLOPT_POST, true ); curl_setopt($soap_do, CURLOPT_POSTFIELDS, $data); curl_setopt($soap_do, CURLOPT_HTTPHEADER, $header); $result=curl_exec($soap_do); $xml = preg_replace("/(<\/?)(\w+):([^>]*>)/", "$1$2$3", $result); $xml = simplexml_load_string($xml); $json = json_encode($xml); $responseArray = json_decode($json,true); return $responseArray; } }
💾 Kaydet
İptal
📝 Yeniden Adlandır
İptal
Kaydet
🔐 Dosya İzinleri (chmod)
İzin Değeri:
Hızlı Seçim:
777
755
644
600
777
= Herkes okur/yazar/çalıştırır
755
= Sahip tam, diğerleri okur/çalıştırır
644
= Sahip okur/yazar, diğerleri okur
600
= Sadece sahip okur/yazar
İptal
Uygula