4.2.1 that we had on our wiki
[tclink.git] / README
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
3 in these countries.
4
5
6 TCLink v4.2.1
7 PHP Implementation
8 copyright (C) TrustCommerce 2016
9 http://www.trustcommerce.com
10 techsupport@trustcommerce.com
11
12 September 13, 2016
13
14 I. DESCRIPTION
15
16 TCLink is a thin client library to allow your e-commerce 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 Web Developer's Guide, so please consult it for
20 any questions you may have about the protocol syntax itself.
21
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
26
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
29 of open source).
30
31
32 II. LICENSE
33
34 TCLink for PHP is released under the GNU LGPL. Please read LICENSE
35 for details.
36
37
38 III. REQUIREMENTS
39
40 You must be running PHP 4.0.4pl1 or higher.
41
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.
45
46
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.
50
51
52 IV. BUILDING
53
54 At the root directory of this archive, execute the following:
55
56 phpize
57
58 Afterwards, type the following commands:
59
60 ./configure --with-ssl
61 make
62
63 Note 1: On some systems, the SSL library may be in a different place, such as /usr/lib64.
64 In that case, type the following commands instead:
65
66 ./configure --with-ssl=/usr/lib64
67 make
68
69 If you are not sure where your SSL library is installed, contact your system administrator or hosting provider
70 for more information.
71
72 If the module builds without errors and you have access to PHP at the command line,
73 you can test it with the following command:
74
75 php -d extension=modules/tclink.so tctest.php
76
77 This script will run a test transaction and print the results.
78
79
80 V. INSTALLATION
81
82 If you have root access to the machine, you will probably want to
83 install TCLink as a global extension. You can do this by copying the
84 module library (modules/tclink.so) to your PHP extensions directory
85 (typically /usr/lib/php5). Your extensions directory is defined by the
86 "extension_dir" directive in php.ini.
87
88 Edit php.ini (typically found in /etc) and add the following line:
89
90 extension=tclink.so
91
92 Restart your webserver, and all PHP scripts will have access to TCLink.
93
94 If you can't or don't want to install the module system wide, you can
95 still load it manually in each script that needs to access it through
96 the dl() call. See the top of tctest.php for an example.
97
98
99 VI. USAGE
100
101 The tctest.php script shows a simple example of running transactions
102 through the TCLink API. A more complex example is contained in
103 tcexample.php. For further information, please consult the TC
104 Developer's Guide, located in the doc subdirectory.
105
106 The curltest.php script shows a simple example of running transactions
107 through the HTTPS post, as describd in the Developer's Guide. It is
108 provided here in as a conveinence to users who are unable to install
109 TCLink and have Curl available in their installation.
110