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

da8iwr

Bollocks, just realised, the system wont recognise if the order was successfull or not, unless it comes back in the correct path. If it comes in the page url as i wrote above, it will say pending, crap i can feel another night of work coming.

Can anybody else help out here?
Ian
Ian Wright
My Design agency
www.NewWorldDesigns.co.uk
Design - CMS - Ecommerce – SEO

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

jmds

Is it not the 'page=checkout.hsbc_return' part that causes the order status to be changed?


Maybe your could add a new parameter for a content item to display after the customer returns and use a 'mosRedirect' at the end of the file.

da8iwr

Hmm i was thinking similar, so it would jump to another page.

Only problem is, i don't think its loading the files at all, which is why its bringing up the whit screen. As when i check the source code there is none at all, just a blank notepad. This is the bit that's confusing me more than anything else, as i would have thought it would have some source, even if not very much at all.

Which is leading me to believe there is some break and it cant find the files, but i checked all files and even refreshed them, to make sure they were there and as they should be (in case the upgrade flashed the files some how) and it still wont work.

What a bummer

I spoke to the client 2 Min's ago, and he said its not a huge issue the pending part, as he always has to check the HSBC panel has taken the money successfully any way before sending a £4K flat screen out, so whether it says pending or completed, it would still need to be checked, so its not much more work than it already is.

But if i do find any fix ill let you know on here
Ian
Ian Wright
My Design agency
www.NewWorldDesigns.co.uk
Design - CMS - Ecommerce – SEO

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

jmds

Zobbster, for some reason I did not see you post. Did you get it working in the end. If not. Check with the HSBC. I think they are able to turn the address display feature on and off from their end. It may need switching on.

da8iwr, I have just been looking at a site with an HSBC CPI issue. It seems to be ok now and the return works fine on their site. This probably does not help, but it may be worth installing the files again.

allstarone

#79
I wrote this short HSBC installation guide, it's got no mention of virtuemart, but it might help someone out of trouble.


http://www.leadingedgewebsites.co.uk/help/hsbccreditcardslinux.html

jason

Hi All,

Thanks for the installation guide on the CPI, however I can't get the shipping and billing address pass through the CPI page, and I'm getting this error:


Parse error: syntax error, unexpected T_STRING in /home/aircond/public_html/administrator/components/com_virtuemart/html/checkout.hsbc_return.php on line 72

Appreciate if anyone could help me out.

Thanks in advance.

jmds

Hi Jason,

Can you post the contents of that line. I helped someone out a while ago on this and they had a different version of the file to me.

jason

Hi jmds,

Thanks for your prompt reply, this is the code on checkout.hsbc_return.php

68 // The transaction was successful
69 switch($CpiResultsCode) {
70 case 0: {
71   $d['order_status'] = 'C';
72   $message = The transaction was approved;
73   break;
74   }

Thanks in advance.

jmds

As I suspected

Quote72   $message = The transaction was approved;

Should be

Quote72   $message = "The transaction was approved";

This will probably need changing on various lines after this one as well. The message text needs to be in quotes.

jason

Thanks jmds!! I will try it now.

Any idea on shipping and billing address not passing to CPI page?

Thanks a million!

jason

Hi jmds,

Is not showing up this error:

Parse error: syntax error, unexpected T_STRING in /home/aircond/public_html/administrator/components/com_virtuemart/html/checkout.hsbc_return.php on line 135

I've replaced all the message with quote

131   case 12: {
132   $d['order_status'] = 'X';
133   $message =  "The transaction failed because the Storefront was configured incorrectly";
134   break;
135   }
136   case 13: {
137   $d['order_status'] = 'X';
138   $message =  "The connection timed out";
139   break;
140   }


Do you have a working copy so I can upload it to my server?
Thank you.

jmds

With regards to the address issue.

Check that l;ine 341 in /administrator/components/com_virtuemart/classes/payment/ps_hsbc.php is

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

and not

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

You also need to ensure that the HSBC have got the address option turned on at their end.

I hope this helps.

jmds

QuoteDo you have a working copy so I can upload it to my server?

I am afraid not, the version of the module I use has not got the message hard coded in this manner.

jason

Quote from: jmds on February 28, 2007, 16:53:47 PM
With regards to the address issue.

Check that l;ine 341 in /administrator/components/com_virtuemart/classes/payment/ps_hsbc.php is

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

and not

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

You also need to ensure that the HSBC have got the address option turned on at their end.

I hope this helps.

Hi jmds,

I've check the code on line 641

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

Is is still having the same error:

Parse error: syntax error, unexpected T_STRING in /home/aircond/public_html/administrator/components/com_virtuemart/html/checkout.hsbc_return.php on line 135


As for the address, I called HSBC, and they say they have nothing to do with the shipping address, we should pass the data into HSBC.

Any ideas?

Thanks a lot.

jason

At last I got it working now, but getting this error when returning to my merchant website:

Warning: fopen(HSBC_CPI_LOG_RETURNS) [function.fopen]: failed to open stream: Permission denied in /home/aircond/public_html/administrator/components/com_virtuemart/html/checkout.hsbc_return.php on line 42

Anyone can help me out?

Thanks in advance.