GODADDY
If your web site is hosted on Godaddy you will NOT be able to use LinkPoint API because they block port 1129.
You will need to use LinkPoint Connect or if you can justify the expense then you can upgrade to their dedicated server.
For Godaddy dedicated servers you will also need to make a change to the lphp.php file.
Do a search for "setopt"
Add the following lines of code:
CODE
curl_setopt ($ch, CURLOPT_HTTPPROXYTUNNEL, true);
curl_setopt ($ch, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);
curl_setopt ($ch, CURLOPT_PROXY, '64.202.165.130:3128');
This information was derived from Godaddy's help center.
REQUIREMENTS:
Make sure the version of PHP is greater than 4.0.2
PHP compiled with both cURL and OpenSSL
SSL certificate for the web site
Port 1129 needs to be open on the web server. Contact your web host to verify.
If you are not sure what version of PHP you have, create a file named phpinfo.php with the following code:
CODE
<?php
phpinfo();
?>
If you are using a Windows server make sure uncomment the cURL extension in the php.ini file which is located in the following directory:
C:\windows\php.ini
On a UNIX server it would be located in the following directory:
/usr/local/php5/lib/php.ini
Edit php.ini, look for the following code, and remove the semicolon at the beginning:
CODE
;extension=php_curl.dll
- Download the PHP wrapper.
- Upload one of the example files such as SALE_MININFO.php
(Do not place any of the PHP files in the cgi-bin folder.)
- Upload the file named lphp.php into the same direcotory
- Upload the PEM file to the same directory as the PHP files you uploaded earlier.
- Edit the example file and change the following 2 lines of code (replace 123456 with your LinkPoint store number):
CODE
$myorder["keyfile"] = realpath("123456.pem");
$myorder["configfile"] = "123456";
If you want to place the PEM file in a different directory then you will need to change the line of code for "keyfile"
CODE for UNIX server
$myorder["keyfile"] = "/home/htdocs/www/linkpoint/123456.pem";
CODE for WINDOWS server
$myorder["keyfile"] = "c:\\inetpub\\wwwroot\\linkpoint\\123456.pem";
If you want to run test transactions, look for the following line of code:
CODE
$myorder["result"] = "LIVE";
Make the following change:
CODE
$myorder["result"] = "GOOD";
If you are using the staging server you will also need to modify the lphp.php file and uncomment 2 lines of code.
Search for "setopt" and remove the pound symbol in front of the 2 lines.
CODE
# curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, 0);
# curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0);
SGS-020003: Invalid XML
If you receive the "Invalid XML" error you will need to add the following line of code for troubleshooting:
CODE
$myorder["debugging"] = "true";
You may need to uncomment the line by removing the 2 forward slashes at the beginning.
Place another order and you will see some code displayed like the following example:
CODE
sending xml string:
<order><orderoptions><ordertype>SALE</ordertype><result>LIVE</result></orderoptions>
<creditcard><cardnumber>4111-1111-1111-1111</cardnumber><cardexpmonth>01</cardexpmonth>
<cardexpyear>05</cardexpyear></creditcard>
<billing><zip>12345</zip><addrnum>&123</addrnum></billing><shipping></shipping>
<transactiondetails></transactiondetails>
<merchantinfo><configfile>679880</configfile><keyfile>679880.pem</keyfile>
<host>secure.linkpt.net</host><port>1129</port></merchantinfo>
<payment><chargetotal>9.99</chargetotal></payment></order>
server responds:
<r_csp></r_csp><r_time></r_time><r_ref></r_ref><r_error>SGS-020003: Invalid XML</r_error>
<r_ordernum></r_ordernum><r_message></r_message><r_code></r_code><r_tdate></r_tdate><r_score>
</r_score><r_authresponse></r_authresponse><r_approved></r_approved><r_avs></r_avs>
Status: Error: SGS-020003: Invalid XML ±
You may need to copy the "sending XML" and "server responds" portion and email it to LinkPoint support.