MikeHeuss.com - The eclectic repository of my life. Programming, writing, and other stuff.

LinkPointClass

I had a client that needed to interface with the LinkPoint API. I wanted a quick and dirty way to get link point going - this class is the result.

This script takes care of all the basics - it will generate the XML request, and parse the XML results.

Below is an example of a credit card transaction:

Example:

require_once ("LinkPointClass.php");

$tp = new LinkPointClass("secure.linkpt.net", "1028889", "../includes/1028889.pem", "1144", true);

//Use the LinkPoint to determine the necessary field names.

("result", "GOOD");

("ordertype", "SALE");

("cardnumber", "4111111111111112");

("cardexpmonth", "12");

("cardexpyear", "08");

("chargetotal", "1.03");

//Send to the server

$tp->DoTransaction("");

//Here is my response code

print ("RV: ".$tp->GetReturnedValues("r_ordernum"));

We created an instance of LinkPointClass, passing in the login and transaction key. Both of these are obtained from Link Point.You can also specify true for the debug, which proceeds to print out information useful for testing/debugging.

Set a few of the required elements (see LinkPoint's documentation), and then throw in a doTransaction.

By using getReturnedValues, you get access to the values passed back from the LinkPoint server.

Documentation

The full class documentation can be found here.

Download

To download: Tar.gz Zip

My disclaimer: I don't guarantee that it will work or do anything, it is provided as is. LinkPointClass.php is made available under the BSD License.

Last Updated: 12 Aug 2005

© 1998 - 2010 Mike Heuss   |   mike@mikeheuss.com  |  386 418 0075  |  6823 NW 218th Street Alachua FL 32615