Forum Moderators: coopster

Message Too Old, No Replies

HSBC CPI integration with PHP /

php_hsbccpi.so library file

         

scooter41

7:44 am on Apr 25, 2007 (gmt 0)

10+ Year Member



With regards to the following forum post:
[webmasterworld.com...]

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]

eelixduppy

12:06 am on Apr 28, 2007 (gmt 0)



Welcome to WebmasterWorld, scooter41!

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 :)

hughie

9:59 pm on May 4, 2007 (gmt 0)

10+ Year Member



Hi there,

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