private function _proccess_complete_sale($itemInfo) { $site = 'US'; $ebay_id = $itemInfo['ebay_id']; if ($this->config->item('production')) { $this->appToken = $this->config->item('appToken'); $this->appToken = $this->appToken[$ebay_id]; } $this->ebay_config['siteToUseID'] = get_site_id($site); $this->ebay_config['callName'] = 'CompleteSale'; $this->load->library('ebayapi/EbaySession', $this->ebay_config); $xml = complete_sale($this->appToken, $itemInfo); echo $itemInfo['order_id']; var_dump($xml); $response = $this->xmlRequest($this->ebaysession, $xml); var_dump($response); if (!isset($response->Ack) || $response->Ack == 'Failure') { $this->ebay_order_model->save_wait_complete_sale($itemInfo['order_id']); } if ($response->Ack == 'Success') { $this->ebay_order_model->delete_order_id($itemInfo['order_id']); } }
private function _proccess_complete_sale($itemInfo) { $site = 'US'; $ebay_id = $itemInfo['ebay_id']; if ($this->config->item('production')) { $this->appToken = $this->config->item('appToken'); $this->appToken = $this->appToken[$ebay_id]; } $this->ebay_config['siteToUseID'] = get_site_id($site); $this->ebay_config['callName'] = 'CompleteSale'; $this->load->library('ebayapi/EbaySession', $this->ebay_config); $xml = complete_sale($this->appToken, $itemInfo); echo $itemInfo['order_id']; var_dump($xml); $response = $this->xmlRequest($this->ebaysession, $xml); var_dump($response); if (!isset($response->Ack) || $response->Ack == 'Failure') { $this->ebay_order_model->save_wait_complete_sale($itemInfo['order_id']); } if ($response->Ack == 'Success') { $this->ebay_order_model->delete_order_id($itemInfo['order_id']); } $filename = '/var/www/html/log/ebay/'; if (!file_exists($filename)) { mkdir($filename); } $filename .= date('Y-m-d') . '.log'; $requestInformation = $xml; writefile($filename, $requestInformation, 'a'); $requestInformation = var_export($response, true); writefile($filename, $requestInformation, 'a'); }