News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

HSBC CPI Integration

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

Previous topic - Next topic

dougal

Thanks for your input guys. Am getting my php guru friend to have a blast in the next week so if he gets somewhere i will post up what we come up with.......hopefully a working version.
cheers
What if the Hokey Cokey really is what it is
all about?

Rachel

I took a few of your code.. mixed it in a pot, and came up with the attached for virtuemart.

You have to set the payment method, as "Paypal (or related)"
HSBC_CPI_RESULT_URL=https://www.something.co.uk/administrator/components/com_virtuemart/html/payment.hsbc_return.php
HSBC_CPI_RETURN_URL=https://www.something.co.uk/index.php?option=com_virtuemart&page=checkout.hsbc_return

As devkungfoo stated files should be:ps_hsbc.php - administrator\components\com_virtuemart\classes\payment
ps_hsbc_secCrypto.php - administrator\components\com_virtuemart\classes\payment
ps_hsbc.cfg.php - administrator\components\com_virtuemart\classes\payment
payment.hsbc_return.php - administrator\components\com_virtuemart\html
checkout.hsbc_return.php - administrator\components\com_virtuemart\html

Although my serious lack of knowledge means, I'm not sure if payment.hsbc_return.php is actually called!

Please note to us newbies out there, that after you have implemented the code, HSBC will want to check your site first before putting the account on their side into production.

Cheers

Rachel.






[attachment cleanup by admin]

dougal

Finally my shop is working  ;D
I have attached the files below,
Once files are in place go to virtuemart/ list payment methods
select hsbc
In the general tab you should have
Active? = ticked
Payment method name = HSBC
Code = HSBC
Payment class name (e.g. ps_netbanx) :
default: ps_payment = ps_hsbc
Payment method type = select paypal or related
leave the rest

go to configuration
process in test mode = this depends on your hsbc account settings, it will be in test mode until the guys and gals at hsbc check your site and change it to live
Storefront ID = your client id supplied by hsbc
cpi hash = your hash key (case sensitive)
CPI result URL = https://yoursite.com/administrator/components/com_virtuemart/html/payment.hsbc_return.php
CPI Return URL = https://yoursite.com/index.php?option=com_virtuemart&page=checkout.hsbc_return
CPI Collect shipping address = no

I have a secure server (not a shared)and am hosted by siteground which is good value and works well. A php coder friend did this for me so i am not sure what exactly he has changed, but, we had it on a test  site first and then i transferred the 5 files across, changed the cpi file paths and it worked well. the only thing we can't quite figure is the collect shipping address function, but maybe we will get it done later.
Thanks to stovesy, devkungfoo and rachel for their input.


[attachment cleanup by admin]
What if the Hokey Cokey really is what it is
all about?

Rachel

Regarding shipping address. I haven't implemented it, but the  HSBC documentation does state that you must enter values for ALL CPI shipping fields, or it will not get included.
So we would have to put a check in on all field to ensure it is submitted.

Regds

Rachel

gan_test

Hi,

I referred the CPI Integration Guide.. Quite difficult to find way out..
In the sample form they have provided the following:
form's action="servlet/Cpi"; 
CpiDirectResultUrl value="https://srvr:8443/cpi/result.jsp";
CpiReturnUrl value="https://srvr:8443/cpi/return.jsp"

when i submit the form with approppriate values, it asks for security alert and then
"The Page cannot displayed" error is displayed.

Can anyone help me the way out?

Rgds,
Ganesh

Quote from: stovesy on September 14, 2005, 12:27:42 PM
!!! FINALLY !!!

It's working.
I've just managed to process my first transaction.
It needs polishing now.

I'll post the code later on today.

Andrew Hemming

#65
Hi,

I have uploaded the files contained in the module pack to the locations as specified above, but when I list payment methods, I still see only the original 16; HSBC is not listed as an option.

I am sure there is something very simple behind this problem - any advice?

I have tried the packs from both Rachel and Dougal...

Regards

Andrew
Website Design, Content Management, Search Engine Optimisation, Graphic Design, Flash Authoring - all in a day's work! :D
Footprint Media - Professional Web Services - http://www.footprintmedia.net

Andrew Hemming

It's OK, have figured it out now. I had to upload the files then add the HSBC service with out entering anything onto the configuration page. I was then able to list the payment methods and when I clicked on HSBC, all the necessary information had been imported...

:)
Website Design, Content Management, Search Engine Optimisation, Graphic Design, Flash Authoring - all in a day's work! :D
Footprint Media - Professional Web Services - http://www.footprintmedia.net

jmds

Hi All,

I have just implemented the HSBC payment module on a site and got the billing and shipping address to be passed through.

I had to change this line(about line 340) in the 'ps_hsbc.php' file:

'ShopperEmail' => substr($dbbt->f("email"), 0, 30),

to

'ShopperEmail' => substr($dbbt->f("user_email"), 0, 30),


da8iwr

I have got this HSBC payment gateway working perfect, and have added the files and a word document with a full step by step instructions to get it working.

Download the zip, and extract the files out (its not a standard Joomla installable zip file, you need to manually upload the files).

It has included

All the PHP files needed
An installation word document i made.
The full Spec from HSBC

Best of luck
Ian
www.newworlddesigns.co.uk

[attachment cleanup by admin]
Ian Wright
My Design agency
www.NewWorldDesigns.co.uk
Design - CMS - Ecommerce – SEO

Virtuemart to Froogle / Google Base XML Feed
www.joomlagooglebase.com

paul

has anybody installed the HSBC payment succesfully. If you have please can you post a link to your site so that i can veiw it thanks for the help

David O'Sullivan

da8iwr,

Thanks so much for sharing your work here!

I am trying to set up a payment module for a client who uses HSBC. I can see that what you have here may be a solution. Although I don't mind customers going to HSBC to submit their card details, can you confirm whether or not they will have to enter their address details all over again with what you have designed (I see that in the 'CPI collect shipping address' it says 'no' and has a message saying 'this causes error'. )

Its just it looks like a fair old slog to get this working from this forum and before I go through with it (and before the client pays the set-up fee) I would like to know that the client does not have to enter their information all over again as we really don't want that.

Thanks

David

jmds

da8iwr's version has the email amendment that I posted earlier in the thread included, so the customer address details should get posted to the HSBC system with no problems.

Christopher

Quote from: da8iwr on December 14, 2006, 23:22:38 PM
I have got this HSBC payment gateway working perfect, and have added the files and a word document with a full step by step instructions to get it working.

Download the zip, and extract the files out (its not a standard Joomla installable zip file, you need to manually upload the files).

It has included

All the PHP files needed
An installation word document i made.
The full Spec from HSBC

Best of luck
Ian
www.newworlddesigns.co.uk

You're a star, Ian - thank you so much for this guide - you've saved me from a very dull New Year
fiddling around trying to fix this - my customer's site is now up-and-running and approved by HSBC.

This work should be picked up and indexed by the moderators of this forum to make it more easily
found by us poor newbies!

Cheers

Christopher
There are 10 types of people in the world:
Those who understand binary and those who don't

Zobbster

#73
Quote from: jmds on December 19, 2006, 10:05:37 AM
da8iwr's version has the email amendment that I posted earlier in the thread included, so the customer address details should get posted to the HSBC system with no problems.

It should, but... it doesn't.  At least not on my site (http://www.stalkiesshop.com/) anyway... and I'd really like to fix that :)

da8iwr, sir, thank you so much for your work on this script - I owe you huge amounts of thanks!

Also, after installing the processor first time around, it threw errors up at me.  checkout.hsbc_return.php's $message's didn't have any quotes around them - so one quick " " session later and it worked like a dream!
-----------------------------------
"moc-moc-a-moc m'dear!

da8iwr

#74
Hey thanks for the great remarks guys and girls, sorry i haven't replied to any questions, I had the wrong email set in virtuemart, and hadn't received any of the emails to tell me i had people writing to me.

I'm having a problem with it for the return address just being a blank screen, after i upgraded to the newer VM 1.0.9 and Joomla 12 form version 10, so all I'm going to do for now is have the return address go to the a page which i made within the site
https://www.spot-ontv.co.uk/index.php?option=com_content&task=view&id=17&Itemid=26

/*define ('HSBC_CPI_RETURN_URL', 'https://www.spot-ontv.co.uk/index.php?option=com_virtuemart&page=checkout.hsbc_return');*/
define ('HSBC_CPI_RETURN_URL', 'https://www.spot-ontv.co.uk/index.php?option=com_content&task=view&id=17&Itemid=26');


I simply just commented the old return url out (yellow text), but kept it so i have it for the future, and replaced it with a page i made, so when the client comes back to the site, they goto the page i made and not what is originally in the old file i uploaded (the red text).

the file you alter is ps_hsbc.cfg.php on lines 8 and 9, its very self explanetry when you get there.

I will spend a little more time trying to find the error a little later on, but it is very small I'm sure, i just haven't the time at the moment (its 3.11am and I'm still working). I may just leave it as it is, as it gives you more ocntrol over what the client sees when they get back :)

I'm not sure it is a simple config problem, or a problem with the upgrade, and if it is the latter, which was it the VM or Joomla upgrade? lol

Oh the pleasures of Open source with zero support service.

As soon as i know anything new ill let you know
Ian

Ps
The site i have as working is
www.spot-ontv.co.uk
Ian Wright
My Design agency
www.NewWorldDesigns.co.uk
Design - CMS - Ecommerce – SEO

Virtuemart to Froogle / Google Base XML Feed
www.joomlagooglebase.com