5.0 from trustcommerce
[tclink.git] / README
... / ...
CommitLineData
1Some countries have regulations on the use of cryptographic libraries
2like the ones embedded in TCLink. It may be unlawful to download TCLink
3in these countries.
4
5
6 TCLink v4.5.0
7 PHP Implementation
8 copyright (C) TrustCommerce 2019-2020
9 http://www.trustcommerce.com
10 techsupport@trustcommerce.com
11
12 February 17, 2020
13
14I. DESCRIPTION
15
16 TCLink is a thin client library to allow your servers to
17connect to the TrustCommerce payment gateway easily and consistently.
18The protocol (which is the same across all platforms and languages) is
19well-documented in the TC Link API Developer Guide, so please consult it for
20any questions you may have about the protocol syntax itself.
21
22 If you are on a Windows environment, do not use this client. Please
23download the COM object and use the COM functions available for Windows
24to access the TCLink object. See here for more information:
25 http://www.php.net/manual/en/ref.com.php
26
27 TCLink was originally ported to PHP by Andrew Barnett of Data Clarity.
28Thanks go to both him (for the code) and his business (for their support
29of open source).
30
31
32II. LICENSE
33
34 TCLink for PHP is released under the GNU LGPL. Please read LICENSE
35for details.
36
37
38III. REQUIREMENTS
39
40 You must be running PHP 4.0.4pl1 or higher.
41
42 You need to have the OpenSSL development libraries installed.
43It is recommended you use the most recent version provided by the
44vendor for PCI reasons.
45
46
47 Besides the normal PHP install, you'll need the php-devel package,
48which contains files needed for building PHP modules. You can tell
49if this package is installed if the binary "phpize" is in your path.
50
51
52IV. BUILDING
53
54 At the root directory of this archive, execute the following:
55
56 phpize
57
58 Afterwards, type the following commands, distribution specific comments provided when available:
59
60General Instructions:
61 ./configure --with-ssl=[directory containing libssl.so]
62 make
63
64Debian Jessie:
65Debian Stretch:
66Debian Buster:
67 ./configure --with-ssl=/usr/lib/x86_64-linux-gnu
68 make
69
70Centos 8.1.1911:
71 ./configure --with-ssl=/usr/lib64
72 make
73
74 If you are not sure where your SSL library is installed, contact your system administrator or hosting provider
75 for more information.
76
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:
79
80 php -d extension=modules/tclink.so tctest.php
81
82 This script will run a test transaction and print the results.
83
84V. INSTALLATION
85
86 If you have root access to the machine, you will probably want to
87install TCLink as a global extension. You can do this by copying the
88module 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.
91
92 Edit php.ini (typically found somewhere in /etc) and add the following line:
93
94 extension=tclink.so
95
96 Restart your webserver, and all PHP scripts will have access to TCLink.
97
98 If you can't or don't want to install the module system wide, you can
99still load it manually in each script that needs to access it through
100the dl() call. Your system must be configured to allow dynamic loading of
101modules for this to work; see your system administrator or hosting provider.
102
103
104VI. USAGE
105
106 The tctest.php script shows a simple example of running transactions
107through the TCLink API. A more complex example is contained in
108tcexample.php.
109
110 The curltest.php script shows a simple example of running transactions
111through the HTTPS post, as described in the TC Link API Developer Guide. It is
112provided here in as a conveinence to users who are unable to install
113TCLink and have Curl available in their installation.
114
115VII. PLATFORMS
116
117 The included code has been tested on the following platforms:
118
119CentOS 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)
121Debian Linux release 8.11
122 OpenSSL Version 1.0.1t-1+deb8u12 (Distribution), PHP version 5.6.40+dfsg-0+deb8u8 (Distribution)
123Debian Linux release 9.8
124 OpenSSL Version 1.1.0l-1~deb9u1 (Distribution), PHP version 7.0.33-0+deb9u6 (Distribution)
125Debian Linux release 10.3
126 OpenSSL Version 1.1.1d-0+deb10u2 (Distribution), PHP version 7.3.11-1~deb10u1 (Distribution)
127