Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

I am using the the Fedex Realtime Quotes v2.04 plugin and recent it has been erroring out when connecting to Fedex at this function in the code on fedex1.php:

 

 function _AccessFedex($data) {

  if (MODULE_SHIPPING_FEDEX1_SERVER == 'production') {
	$this->server = 'gateway.fedex.com/GatewayDC';
  } else {
	$this->server = 'gatewaybeta.fedex.com/GatewayDC';
  }
  if (MODULE_SHIPPING_FEDEX1_CURL == "NONE") {
	$ch = curl_init();
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
	curl_setopt($ch, CURLOPT_URL, 'https://' . $this->server);
	if (MODULE_SHIPPING_FEDEX1_TIMEOUT != 'NONE') curl_setopt($ch, CURLOPT_TIMEOUT, MODULE_SHIPPING_FEDEX1_TIMEOUT);
	curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
	curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
	curl_setopt($ch, CURLOPT_HTTPHEADER, array("Referer: " . STORE_NAME,
											   "Host: " . $this->server,
											   "Accept: image/gif,image/jpeg,image/pjpeg,text/plain,text/html,*/*",
											   "Pragma:",
											   "Content-Type:image/gif"));
	curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
	$reply = curl_exec($ch);
	curl_close ($ch);
  } else {
	$this->command_line = MODULE_SHIPPING_FEDEX1_CURL . " " . (MODULE_SHIPPING_FEDEX1_TIMEOUT == 'NONE' ? '' : '-m ' . MODULE_SHIPPING_FEDEX1_TIMEOUT) . " -s -e '" . STORE_NAME . "' --url https://" . $this->server . " -H 'Host: " . $this->server . "' -H 'Accept: image/gif,image/jpeg,image/pjpeg,text/plain,text/html,*/*' -H 'Pragma:' -H 'Content-Type:image/gif' -d '" . $data . "' 'https://" . $this->server . "'";
	exec($this->command_line, $this->reply);
	$reply = $this->reply[0];
  }
	return $reply;
}

 

I am using the curl option and if I comment out the line "$reply = curl_exec($ch);" the page will then load fine and say no data was retrieved, however if don't comment out that line the page will do the "Page cannot be displayed" thing.

 

Has anyone else had a problem with this? Is it the fedex gateway? Has something changed on my host? I'm at a loss as to what to do. Thanks in advance!

Posted

You might be getting page cannot be displayed because of a connection timeout. Try setting the FEDEX timeout. You should be able to change this on the module page.

 

You could be getting the problem because your host's server is having trouble resolving the DNS entry for the fedex server. If this is the case, there's not a ton you can do. Your host will either have to fix it, or you can use an exact IP instead of a domain name.

Contributions

 

Discount Coupon Codes

Donations

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...