Hello, all:
I'm Jos? Le?n, the developer of this contribution, here are some clarifications regarding the module:
--
Regarding the 2 step on checkout_process.php, this is only valid for Lynda's shop, it has some modifications that vary from the standard code, in any case, that line is to make match the order_id sent to the HSBC CPI with the order is being created when the order is processed, in the standard MS2 code, search for this line in checkout_process.php:
$insert_id = tep_db_insert_id();
And add this line just below:
if (!empty($_POST['OrderId'])) $insert_id=$_POST['OrderId'];
So it will look this way:
$insert_id = tep_db_insert_id();
if (!empty($_POST['OrderId'])) $insert_id=$_POST['OrderId'];
I don't have tested it throughtly but must work ;-)
--
Regarding the path where the TestHash.e is located, is hardcoded into the hsbc.php module, right here:
//Path where the TestHash.e executable is located
$path='/home/virtual/site131/fst/var/www/cgi-bin';
Yes, this is the path from the root, exactly as PHP sees the file system, so it can find it. If you have a virtual server you can place the executables and .so on any dir, and that dir must have execution permissions for everyone, or at least, for the apache user.
The problem with the HSBC Payment module is that you need to use an .so file to generate the HASH based on the user's private key, I have used the TestHash.e ready compiled executable to allow anyone which gets the module to use it, instead to write an entire new C program to generate that HASH. For those of you who doesn't know, there is a C version and a Java version, I supose you will prefer to use the C version in most cases. So TestHash.e is the "production" code, because it just generates the hash, the only thing I need to call the CPI properly.
Regarding the Java code..., well, is an option, but is faster to use the C version.
--
Regarding what you will need also to make it work, is the CPI kit you get when you contract the HSBC CPI, in this kit you will get the TestHash.e and the .so, needed to generate the hash which authenticates you against the CPI
--
I hope it helps!
Regards
--