Forum Moderators: coopster
But this is too old to reply, so I am posting here instead!
I am using the library created by angryrooster:
He states to use the following code (snippet from full script)
f (extension_loaded("php_hsbccpi") &&!$loaded) {
echo "The module 'php_hsbccpi' could not be loaded - your order will not process through the HSBC CPI.";
} else {
$hashKey = "12345678901234567890123456789012"; /* Your 32-Digit Hash Key */
$variables = array( "Here", "Are", "Some", "Variables" );
$orderHash = _hsbccpi_generate_hash($variables, $hashKey);
}
My question is what should the $variables array be? I am using the following at the moment but getting the horrid CODE 10 back:
$variables = array("$CpiUrl","$OrderId","$TimeStamp","$CpiReturnUrl", "$CpiDirectResultUrl","$StorefrontId","$OrderDesc","$PurchaseAmount", "$PurchaseCurrency","$TransactionType","$UserId","$Mode","$MerchantData", "$BillingFirstName","$BillingLastName","$ShopperEmail","$BillingAddress1", "$BillingAddress2","$BillingCity","$BillingCounty","$BillingPostal", "$BillingCountry","$ShippingFirstName","$ShippingLastName","$ShippingAddress1", "$ShippingAddress2","$ShippingCity","$ShippingCounty","$ShippingPostal", "$ShippingCountry");
Does any one have any further information with regards to this?
Thanks for any help in advance
[edited by: dreamcatcher at 10:03 am (utc) on April 25, 2007]
[edit reason] no urls as per T.O.S [webmasterworld.com].Thanks [/edit]
It seems that there isn't anybody here that is familiar with that script. Did you figure out what the variables array is suppose to contain? If not, maybe we can find an alternate solution to your problem. Did the script come with a readme file? Is so, your answer may be within :)
I've installed several HSBC systems and i've only used the exec method. Do you need help with that?
The code 10 (bad address variables) usually occurs when the two sets of data aren't an exact match.
The two sets being the data sent to the Hash script, and the data posted to the servlet.
hope that's of some use.
Hughie