Prepare the server with all the bits we need, most should already be installed if not all!
# yum install swig
# yum install gcc gcc-c++ autoconf automake
# yum install sed
Download your SDK to say the /root directory then decompress the taball
# wget http://www.ipg.stgeorge.com.au/downloads/StGeorgeLinuxAPI-3.3.tar.gz
# tar -xzvf StGeorgeLinuxAPI-3.3.tar.gz
# cd webpaySWIG-3.3
Edit the config within the makefilePhp5 file as follows:
# vi makefilePhp5
Now edit the values as below but NOTE: your directory location can be different from what I’ve used, using phpinfo() should reveal the correct extension directory.
PHP_EXTENSIONS = /usr/local/lib/php/extensions/no-debug-non-zts-20090626/ - Line 33
PHP_INCLUDE_DIR = /usr/include/php/ – Line 37
LIB_LOCATION should be the same at PHP_EXTENSIONS and the makefile is scoped this way, if it’s not then change it.
Run the below command:
# make -f makefilePhp5
This will build the API for php on your server
Then add the library extension to your servers php.ini file.
Note: phpinfo page should shows the webpay module information.
Alternatively try running this below command from shell to make sure we are good.
root@server[~]# php -i | grep webpay_php
Webpay PHP Library => webpay_php.so
That's all :)
For more info check this below links: