What a group to bring together, eh?
I’m using the following:
http://www.wordpress.org
http://www.shopplugin.net
http://www.mediatemple.net
http://curl.haxx.se/
So first off, I had an issue where the FirstData plugin built by Shopp was pointing to the incorrect URL:
var $url = “https://secure.linkpt.net/lpcentral/servlet/lppay”;
This url is actually FirstData’s ‘Connect’ url… which is a forms based api… but the Shopp Plugin FirstData gateway plugin actually uses FirstData’s ‘Global Gateway Api’, but this is not the URL that they are using … When I called FirstData and gave them that URL, they assumed that I was using the ‘Connect’ product and proceeded to set me up with that on their side. This resulted in a bit of a monkey race for me until I looked further at what the Shopp FirstData gateway plugin was actually doing. When I realized that it was passing XML on port 1129 to FirstData, I knew then that it was not following the ‘Connect’ pattern, but rather was following the model setup for the ‘Global Gateway API’.
When I changed the URL string to the following:
var $url = “https://secure.linkpt.net/”;
I was now getting a ‘timeout’ error rather than an HTML page for a return from cUrl.
cUrl allows you to set some options to manage timeout issues … so I tried them:
curl_setopt($connection, CURLOPT_CONNECTTIMEOUT, 4);
curl_setopt($connection, CURLOPT_TIMEOUT, 8);
After some digging in the log files, I found that cUrl was attempting the connection on port 443, when FirstData actually requires port 1129. Shopp’s FirstData gateway plugin uses the following curl_setopt() to set the port:
curl_setopt($connection, CURLOPT_PORT, 1129);
Unfortunately, MediaTemple does not appear to accept this…because cUrl’s default 443 port was what was showing in the logs.
So… I modified the URL string:
var $url = “https://secure.linkpt.net:1129
and commented out the curl_setopt:
// curl_setopt($connection, CURLOPT_PORT, 1129);
This resolved all my issues, and the cart began processing orders.
My initial complaint here is with Shopp’s FirstData gateway plugin… having the URL string for FirstData’s ‘Connect’ product is a bit misleading… and completely incorrect… it does not work with the approach that the plugin was taking, as it was actually built to use the ‘Global Gateway API’. I wasted a lot of time going down the wrong road here because of this. My second complaint is with FirstData … as I had shown them the plugin, and they responded by setting me up with ‘Connect’ … making the same assumption that I had about the URL string… but not looking any further into what the plugin was trying to do. My third complaint is that MediaTemple does not seem to support the use of curl_setopt() … at least not for setting the port that cUrl runs on.
Hopefully this helps someone else save a bit of time. It was a bugger for me.