1 Some countries have regulations on the use of cryptographic libraries
2 like the ones embedded in TCLink. It may be unlawful to download TCLink
8 copyright (C) TrustCommerce 2019-2020
9 http://www.trustcommerce.com
10 techsupport@trustcommerce.com
16 TCLink is a thin client library to allow your servers to
17 connect to the TrustCommerce payment gateway easily and consistently.
18 The protocol (which is the same across all platforms and languages) is
19 well-documented in the TC Link API Developer Guide, so please consult it for
20 any questions you may have about the protocol syntax itself.
22 If you are on a Windows environment, do not use this client. Please
23 download the COM object and use the COM functions available for Windows
24 to access the TCLink object. See here for more information:
25 http://www.php.net/manual/en/ref.com.php
27 TCLink was originally ported to PHP by Andrew Barnett of Data Clarity.
28 Thanks go to both him (for the code) and his business (for their support
34 TCLink for PHP is released under the GNU LGPL. Please read LICENSE
40 You must be running PHP 4.0.4pl1 or higher.
42 You need to have the OpenSSL development libraries installed.
43 It is recommended you use the most recent version provided by the
44 vendor for PCI reasons.
47 Besides the normal PHP install, you'll need the php-devel package,
48 which contains files needed for building PHP modules. You can tell
49 if this package is installed if the binary "phpize" is in your path.
54 At the root directory of this archive, execute the following:
58 Afterwards, type the following commands, distribution specific comments provided when available:
61 ./configure --with-ssl=[directory containing libssl.so]
67 ./configure --with-ssl=/usr/lib/x86_64-linux-gnu
71 ./configure --with-ssl=/usr/lib64
74 If you are not sure where your SSL library is installed, contact your system administrator or hosting provider
77 If the module builds without errors and you have access to PHP at the command line,
78 you can test it with the following command:
80 php -d extension=modules/tclink.so tctest.php
82 This script will run a test transaction and print the results.
86 If you have root access to the machine, you will probably want to
87 install TCLink as a global extension. You can do this by copying the
88 module library (modules/tclink.so) to your PHP extensions directory
89 (typically /usr/lib/php*). Your extensions directory is defined by the
90 "extension_dir" directive in php.ini.
92 Edit php.ini (typically found somewhere in /etc) and add the following line:
96 Restart your webserver, and all PHP scripts will have access to TCLink.
98 If you can't or don't want to install the module system wide, you can
99 still load it manually in each script that needs to access it through
100 the dl() call. Your system must be configured to allow dynamic loading of
101 modules for this to work; see your system administrator or hosting provider.
106 The tctest.php script shows a simple example of running transactions
107 through the TCLink API. A more complex example is contained in
110 The curltest.php script shows a simple example of running transactions
111 through the HTTPS post, as described in the TC Link API Developer Guide. It is
112 provided here in as a conveinence to users who are unable to install
113 TCLink and have Curl available in their installation.
117 The included code has been tested on the following platforms:
119 CentOS Linux release 8.1.1911 (Core)
120 OpenSSL Version 1.1.1c-2 (Distribution), php-cli-7.2.11-2.module_el8.1.0+209+03b9a8ff.x86_64 (Distribution)
121 Debian Linux release 8.11
122 OpenSSL Version 1.0.1t-1+deb8u12 (Distribution), PHP version 5.6.40+dfsg-0+deb8u8 (Distribution)
123 Debian Linux release 9.8
124 OpenSSL Version 1.1.0l-1~deb9u1 (Distribution), PHP version 7.0.33-0+deb9u6 (Distribution)
125 Debian Linux release 10.3
126 OpenSSL Version 1.1.1d-0+deb10u2 (Distribution), PHP version 7.3.11-1~deb10u1 (Distribution)