Forum Moderators: coopster

Message Too Old, No Replies

HSBC secure e-payment troubles

following on from previous post which has closed

         

hughie

1:01 pm on Jan 4, 2005 (gmt 0)

10+ Year Member



Having major trouble (like many others) with HSBC secure e-payment system. I would have added this to the older post but it's been closed so i'll start a fresh one.

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);
return $hash;

and my POST FORM:

<form name="cpiForm" method="POST" action="https://www.cpi.hsbc.com/servlet"><br>
<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 &gt;" class="submit">
</form>

Any help would be very appreciated indeed!

Hughie

[1][edited by: jatar_k at 9:05 pm (utc) on Feb. 8, 2005]

jatar_k

10:55 pm on Jan 5, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



anyone?

I don't use this myself

hughie

4:10 pm on Jan 6, 2005 (gmt 0)

10+ Year Member



fixed it actually,

HSBCs documentation fails to mention that if you are submitting any address fields to the secure e-payment system, then you have to submit both billing and delivery fields.

stumped a lot of people this system so wasn't expecting too many replies! ;-)

Cheers,
hughie