Example #1
0
 private function _process_confirm_package($track_code)
 {
     $this->load->library('epacket/Order');
     $this->Order->TrackCode = $track_code;
     $this->load->library('epacket/ConfirmPackage');
     $this->confirmPackage->APIDevUserID = $this->token['dev_id'];
     $this->confirmPackage->APISellerUserID = $this->token['user_id'];
     $this->confirmPackage->APIPassword = $this->token['api_key'];
     $this->confirmPackage->MessageID = $this->config->item('message_id');
     $this->confirmPackage->Version = $this->config->item('version');
     $this->confirmPackage->Order = $this->Order;
     $this->confirmPackage->TrackCode = $track_code;
     try {
         $wsdl_url = $this->config->item('wsdl_url');
         $client = new SoapClient($wsdl_url);
         $response = $client->ConfirmAPACShippingPackage(array('ConfirmAPACShippingPackageRequest' => $this->confirmPackage));
         $result = $response->ConfirmAPACShippingPackageResult;
         $this->epacket_model->confirm_package($track_code);
         var_dump($result);
     } catch (SOAPFault $exception) {
         print $exception;
     }
 }