Forum Moderators: coopster
I am generating my hash key fine but when i post to HSBC it just send me back to my order complete page.
2 questions really:
1. am i generating the string correctly which i'm passing to the hash generator
2. is my POST page ok.
here's the PHP
$timestamp=time()*1000;
$cmd='"https://secure.mysite.com/order_results.php","https://secure.mysite.com/order_complete.php","T","Test 101","2217","826","UKMYIDNUMGBP","'.$timestamp.'","Auth","userid"';
$cmd="$this->c_files_path/TestHash.e 11212121212121212121212+ $cmd";
$ret=exec($cmd);
$ret=split(':',$ret);
$hash=trim($ret); and my POST FORM: <form name="cpiForm" method="POST" action="https://www.cpi.hsbc.com/servlet"><br> Any help would be very appreciated indeed! Hughie [1][edited by: jatar_k at 9:05 pm (utc) on Feb. 8, 2005]
return $hash;
<img src="img/spacer.gif" height="18" width="1">
<INPUT type="hidden" size="80" name="CpiDirectResultUrl" value="https://secure.example.com/order_results.php">
<INPUT type="hidden" size="80" name="CpiReturnUrl" value="https://secure.example.com/order_complete.php">
<INPUT type="hidden" size="80" name="Mode" value="T">
<INPUT type="hidden" size="80" name="OrderDesc" value="Test 101">
<input type="hidden" name="OrderHash" value="'.$GLOBALS[orderhash].'">
<INPUT type="hidden" size="80" name="PurchaseAmount" value="2217">
<INPUT type="hidden" size="80" name="PurchaseCurrency" value="826">
<INPUT type="hidden" size="80" name="StorefrontId" value="UK00000000GBP">
<INPUT type="hidden" size="80" name="TimeStamp" value="'.$GLOBALS[timestamp_new].'">
<INPUT type="hidden" size="80" name="TransactionType" value="Auth">
<INPUT type="hidden" name="UserId" value="myname">
<input type="submit" value="PROCEED TO PAYMENT >" class="submit">
</form>