I have a question regarding the $time code in this contribution.
According to the authors comment, and several replies I've seen on this thread we need to do this...
$time = time();
//Change the 0 if your server is located at a different GMT time
$time = ( $time + ( -8 * 3600 ) );
$time = $time * 1000;
...to make the contribution work in a none GMT time zone. I've found this to be incorrect, in php the function time() returns a unix timestamp, which does not have time zones, so adjusting it will end up switching the time that's posted to HSBC from GMT to the local time (in the above code PST). The HSBC documentation states that the time posted to the CPI should be +/- 1 hour from GMT, so a local time will always fail.
I can't see any reason for this code, has anyone set up a store on a server outside the UK and successfully made this adjustment?
I have the contribution working without that adjustment, if I do make the 8 hour time zone change I get an error 4 (The processor did not return a response.) from the CPI.
I've therefore changed the code to this.
//POST time, in milliseconds
$time = time() * 1000;