News:

Support the VirtueMart project and become a member

Main Menu

HSBC CPI Integration

Started by jon.hathaway, July 22, 2005, 19:28:56 PM

Previous topic - Next topic

cmax

Hiya. This code looks excellent, but Im not having much joy getting this to work.. Ive downloaded the latest code, updated the config, tried selecting payment processor types of "use payment processor" and "bank debit" but still no joy.. With "use payment processor" everything happens on my site and nothing goes to hsbc at all.. (and I dont fancy taking credit card numbers on my site  :o )

Im sure its just a configuration / setting... Any advice?

Would really appreciate your help.   ;D Cheers.

cmax


terryd

Whats the latest regarding this module. I have the latest version installed from this topic. But i am a bit unsure what to put in the configuration part of it.
Cheers Terry

dougal

Has anyone got this module working with HSBC bank in the UK? I need to use hsbc and i want to use virtuemart. i'm just wondering if it is a possibility or have people given up on this one?
Cheers
What if the Hokey Cokey really is what it is
all about?

devkungfoo

#49
Hey All,

I haven't worked on HSBC payments for quite some time now and I'm not sure if anything
has changed since the last time I posted.

RE:
Quote from: stovesy on August 22, 2005, 10:42:26 AM
I've actually got libmcrypt - but am struggling to find php_mcrypt.dll.

I've got linux at work so I'll set it up on that.
The only concern I have is we are putting more requirements on our hosts (to have mcrypt installed). Wouldn't it be nice if we could get this all done in native php ?

mcrypt and mhash are fairly rarely provided by hosting co's and most will not install it - i came across this issue
and was forced to create a way of doing it in native php (no additional libraries.)

I have attached the script,
once this script is included you can get the hash as follows

generateHash($tmp, HSBC_CPI_HASH_KEY);

where $tmp is the array of values to calculate the hash on (this is a plain array not associative) and
HSBC_CPI_HASH_KEY would naturally be your hsbc provided hash key.

enjoy :)



P.S. Dougal it is possible, i have implemented it on 2 different sites successfully.

[attachment cleanup by admin]

dougal

Thanks devkungfoo, i'll have a go at it. I also got a message from stovesy who said he has started to have another go at this so things are certainly looking up for this module.
Cheers
What if the Hokey Cokey really is what it is
all about?

dougal

Devkungfoo is there any chance you can share the working module with your alterations, or maybe just your code and where to place it, it would be greatly appreciated.
cheers
What if the Hokey Cokey really is what it is
all about?


Rachel

Hi

I am trying to integrate your files into virtuemart devkungfoo .  I have uploaded files into the correct virtuemart directories rather than com_phpshop, and altered a couple of sql calls due to virtuemart's slightly different structure.
However I am now completely bewildered (php not my strong point!).  Am I correct in saying this method doesn't need checkout.hsbc_return.php?
I am putting in card details, and it is saying that the payment has been processed, but I'm not sure it is even interacting with HSBC.
Can anyone enlighten me..  I am completely confused, been trying to integrate this for aaaaaaages!!!!

Thanks
Rachel

Rachel

Do I need to put a submission button in the extra info field? ???
Thankx

Rachel

For anyone as dumb as me.  For some reason, the config page for payment module didn't initially load the extrainfo.  I just spent all afternoon trawling through the code, to see that if I click the reset button, I will get the form required to submit the payment to the CPI. 
I'm now going to leave it until monday to do the rest - but this is a major breakthrough for me.  Although it didn't seem to call the payment.hsbc_return.php afterwards.

Thank you for code so far........

:)

dougal

Thanks for the code devkungfoo, greatly appreciated. I have been getting a strange error when i test, i don't get asked to enter bank details but when i click "confirm order," i get this message "Error: You have actually not provided your bank account holder name." which is right since i haven't.
I didn't realise i had to change the sql calls so i will have a go at that and maybe i'll get somewhere. Could i see what you have changed Rachel because if you think you are dumb Rachel believe me i am in a league of my own.
Cheers

What if the Hokey Cokey really is what it is
all about?

Rachel

I spoke to HSBC this morning, and they have demanded that I remove the credit card input fields from my site before they will set the payment account to production from test.  I explained to the man that it was 128bit encrypted and details were not stored on our database, but he insisted it was company policy and to call him back once they were removed :(

Will dig out files for you.

devkungfoo

Hey All,

I know that code defintely worked on php-shop, I have no clue regarding the differences between virtuemart and php-shop editions.

What I do know for a fact is that the hashing code still works 100% because I used that this week for a client using oscommerce.

I wish I had time to install virtuemart and test out the payment system because I know the struggle involved in working it out for php-shop, unfortunately I really don't have much time.

If I do get some time and manage to make some headway I'll let you guys know.

Rachel

I'm not saying it works yet, but attached is the page that I altered the calls for.  Only changed 2 sql queries.

devkungfoo thanks for all your code so far  ;D

Now trying to do a version removing the payment method version for the mean man at HSBC.  devkungfoo can you point us towards one of your sites wher eit works, so I can see how it should look eventually?

Thanks

[attachment cleanup by admin]