Forum Moderators: coopster

Message Too Old, No Replies

HSBC ePayments

Integrating HSBC ePayments PHP

         

pboreham

9:54 am on Jun 21, 2005 (gmt 0)

10+ Year Member



Hi All,

I wonder if anybody can help us at all. We are really struggling to integrate the HSBC CPI on our Linux Redhat server.

I have tried the JAVA files and the C files, but I am getting nowhere fast. The help I have been receiving from HSBC 'Technical' is pretty poor and obviously the documentation sucks.

So far, I have got as far as uploading the sample pages that came in the HSBC archive, but cannot get any further. For the JAVA files, I installed JAVA on our server and set that up ok - though the guy at HSBC was talking about setting the CLASSPATH for one of the HSBC files, though he would not elaborate any further (great help eh?)

I have tried the C files now and after submitting the sample form, I get the message that "OrderHash.e" cannot be found. I do not have an OrderHash.e file and again, HSBC will not help with this.

I have installed the .so file on my server, though running TestHash.e from the command prompt gives and error about accessing library files.

I cannot take much more of this! Can anyone shed some light please?

Many Thanks, Paul.

coopster

10:10 am on Jun 21, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld, pboreham.

Have you searched over this forum for HSBC? I've seen a few lengthy threads on the subject but have never been involved with it myself.

[webmasterworld.com...]

pboreham

10:39 am on Jun 21, 2005 (gmt 0)

10+ Year Member



Hi,

Yea, I have been through the threads on here regarding HSBC, but again I havent been able to make any use of them...

Just seems I cannot get going with it!

Paul

hughie

4:04 pm on Jun 21, 2005 (gmt 0)

10+ Year Member



Hi Paul

Can you give us a bit more background to what position you're in with the site, are you looking to get it working in PHP (i assume yes)? and do you have access to the server to place the .so files in the right place?

Cheers,
hughie

pboreham

4:49 pm on Jun 21, 2005 (gmt 0)

10+ Year Member



Hi Hughie,

Yep, I have full access to the server and can install any files that are needed.

I have been trying to install the library files into /usr/lib (and /usr/local/lib) which seemed to go ok, but when I test TestHash.e I get an error something like:-

"error while loading shared libraries: libstdc++-libc6.2-2.so.3 cannot open shared object file"

Somebody else has given me some RPM files to download and install (and I think it mentioned it on this site - though I've looked for so much help I am confused where I've been!). The first RPM file installs, but the second fails saying that it needs to reference another file...

I've had a gut-full to be honest!

I've got as far as:-

And you can see the error I am getting...

If anyone can help, it would be fantastic.

Rgds, Paul

** EDIT ** I am testing the site now, and when submitting the form, I am getting a pop-up asking me to "SAVE or OPEN" OrderHash.e

Bit worrying?!

[edited by: jatar_k at 5:53 pm (utc) on June 21, 2005]
[edit reason] no urls thanks [/edit]

hughie

7:17 pm on Jun 21, 2005 (gmt 0)

10+ Year Member



i still don't really know where your problem is other than it's not working, could you give us a description of what you are doing up the point where you need the HSBC files

not sure why you need any RPM files, all i did was place the libCcCpiTools.so in /usr/lib/ directory and the other HSBC files just behind my public directory at
/home/domain/hsbcstuff/

ta,
hughie

pboreham

7:39 am on Jun 22, 2005 (gmt 0)

10+ Year Member



Hi Hughie,

Thanks for the reply.

If you are placing the other HSBC files behind your web-level directory, how can you access it from the internet?

Rgds, Paul

**EDIT** to give you some idea, this is the directory to my viewable web files - where would you place the HSBC files in this directory?-

/home/default/"DOMAIN"/user/htdocs

hughie

8:00 am on Jun 22, 2005 (gmt 0)

10+ Year Member



Hi Paul

Still dont really know much about your situation, are you using php?

if so you can access the HSBC files through PHP away from the public directory, i wouldn't put them any higher for security reasons.

ta,
hughie

pboreham

8:23 am on Jun 22, 2005 (gmt 0)

10+ Year Member



Hi Hughie,

Yea, I will be using PHP, but at the moment all I have uploaded is the SAMPLE.HTML file and the other files from HSBC.

I did also alter the HSBC file slightly at first and put a PHP page up to make sure the form details were being passed to the next page, which they are.

I'm not sure what else I can tell you other than what I already have. I can run TestHash.e from the Linux command prompt, but get a Library error back.

I've got the guys who maintain the server looking at that now, so hopefully they will make some headway.

If you require any specific details, then please let me know. Sorry if I cannot explain it in any more detail, but my brain is fried with it now!

Rgds, Paul

hughie

12:52 pm on Jun 22, 2005 (gmt 0)

10+ Year Member



The best thing i found was to build the shopping cart right up to the point where you've colected all the prices, billing and delivery information so you are ready to pass the correct info to the testhash.e

Then you can start picking through the errors and problems as we'll know where you're at

ta,
hughie

pboreham

1:02 pm on Jun 23, 2005 (gmt 0)

10+ Year Member



Right-o! The guys that maintain our dedicated server have had a look and made some alterations, installed some library files and altered access rights for some of the files... meaning...

It now works... kinda :-?

I can send the values to HSBC from the web, but get this back. Can anyone confirm if this is OK and just because I have only currently got a test store running please?

Request Parameters:
StorefrontId = 1262
OrderId = 6075744475
PurchaseAmount = 1995
PurchaseCurrency = 840
PurchaseDate = 1119531545036
CpiResultsCode = 12
Hash Fields: 1262,6075744475,1995,840,1119531545036,12
ERROR: OrderHash not found.

Not sure why it says "ERROR: OrderHash not found." as the hash is generated and shown the the previous page...

Cheers, Paul.

woodgnome

12:20 pm on Jun 24, 2005 (gmt 0)



Hello,

I'm in the same boat at the moment with HSBC - I'm generating a hash via php and sending it to the HSBC servlet, but am only getting CpiResultCode = 10 back. I've emailed HSBC (secure-epaymants@hsbc.com) who have told me that the OrderHash that I have generated differs from the one they are generating. Currently investigating why!

If CpiResultCode = 12 this means that the 'storefront is incorrectly configured' according to the documentation. Is the OrderHash you are generating 28 digits long?

hughie

4:19 pm on Jun 28, 2005 (gmt 0)

10+ Year Member



Hi Guys, been off for a few days so apologies in not getting back.

it's very difficult to pinpoint the actual problems with the hash but one thing to do is to make sure that what is being sent to HSBC in the POST from your form is also being passed exactly to the HASH function, i had a lot of trouble with a few minor errors in the hash generation, i only solved it by hard type everything to start with so that i could make sure it was all exact with no extra white space or similar

Cheers,
hughie

pboreham

3:41 pm on Jun 30, 2005 (gmt 0)

10+ Year Member



Hi all...

Well, I am pleased to say I am getting to the end of my epic voyage.

I just wish I could offer some help to other people that are stuck with this, but the truth is, I dont think I am any the wiser! In the end, the guys who maintain our dedicated server had to log in and make some changes in Linux for it to work.

I have one final question!

When the order form on the website is submitted, the details are sent to OrderHash.e (which is displayed on the website) - clicking submit on this screen then takes you on to the HSBC payment facility.

How can I go straight from my form to the HSBC site without OrderHash.e being displayed to my users?

I can see the light at the end of a VERY dark tunnel!

Paul.

pboreham

4:01 pm on Jul 4, 2005 (gmt 0)

10+ Year Member



Replying to my own messages now!

Does anyone know how to receive the data back from the CPI?

After completing payment etc, the user gets returned to CcResults.e - not what I want them to see!

I have made a 'thank you' page and put the URLs (with HTTPS) in the form for both "CpiDirectResultUrl" and "CpiReturnUrl" but this causes the system to crash with an Error 10.

Anyone have any advice please?!

Cheers, Paul

hughie

11:40 pm on Jul 4, 2005 (gmt 0)

10+ Year Member



The direct result URL is where the result of the payment is sent, this is where you want HSBC to post to but not send the user to, the other is the fallback page that will display depending on the outcome of the result. use PHP to display a different result according to what code is sent back.

10 means that some of your data that created your hash wasn't correct or doesn't match the data sent in your POST.

hughie