Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

HSBC secure-epayment module


Guest

Recommended Posts

OK, hacking attempt problem now sorted (apparently some Linux kernel modules weren't installed on the new server), but now whenever it tries to connect to the CPI, it comes back to hsbc_return.php with an "invalid input data" message-after reading back through this thread it seems the problem was often related to HSBC knowing that the site is running in production mode, but it has been for over 12 months now so that shouldn't be a problem. Any ideas/thoughts would be much appreciated.

Cheers, Jon

 

 

I had initial problems with the time on my server. I spoke to HSBC support and they were able to tell me that the time I was sending was too far out of the allowed range. My time was 5 hours out because my timezone was set incorrectly. I suggest giving HSBC support a call as they can tell you why their server has rejected your request. You can adjust the time by editing hsbc.php in /catalog/includes/modules look for the line $time=($time+(0*3600)); .

 

Hope this helps

 

Sean

Link to comment
Share on other sites

  • Replies 1.2k
  • Created
  • Last Reply

Top Posters In This Topic

That's great, thanks, called HSBC up and they confirmed what you suggested, apparently the time stamp is/has an invalid character, I'm guessing this is a server side thing and will get onto my hosting company to see if they can help sort anytihng out...

Link to comment
Share on other sites

For future reference if anyone needs it, below is the fix for the time stamp generation, all I did was edit the following lines:

 

 

//POST time
  $time=time();

  //Change the 0 if your server is located at a different GMT time	
  $time=($time+(0*3600));
  $time=$time*1000;

 

by replacing the bottom line as shown below:

 

 

	  //POST time
  $time=time();

  //Change the 0 if your server is located at a different GMT time	
  $time=($time+(0*3600));
  $time=$time."000";

 

That's meant that it's stopped doing a mathematical equation and is now just adding 3 zeros. Seems to have worked a treat...

Link to comment
Share on other sites

Some customers have problems with HSBC payment.

When their click Confirm payment on my site to go to HSBC, it sometimes skips HSBC site and goes to your order is confirmed !!

I few customers then use Paypal OK.

Has anyone had this problem.

 

P.S

It happens to 1% of customers, which at this time of year is more noticable.

 

Thanks

Sean

Link to comment
Share on other sites

hello all;

have any one istalled the new contrbutions of hsbc

http://www.oscommerce.com/community/contri...all/search,hsbc

HSBC CPI Secure ePayment Card Processing Module 1.1a (w/ GNU license file) by downhom 25nov 2005.

i have installed it in my site. i am waiting for my merchant details to check it.

if any one tell me in advance:

1) what will i have to do when i get my merchant details?

2)what files will i be needed to add in cgi_bin?

3)do i need to have a ssl . if yes would the shared ssl work or i need a

dedicated ssl?

4)what should be the minimum ssl value(256, 128 or it may be lower)?

5)are all the errors resolved in this contrbution?

Link to comment
Share on other sites

I'm back :)

 

After getting the system to work 5 months ago we have decided to send the address information to prevent fraud but now I'm getting a CPIRESULTS = 10

 

Below is the form that I'm sending along with the hash generation. If anyone can see what the problem is then please tell me. I still have nightmares from setting this up.

 

$Hash = generateHash(array("$DirectResult", 
"$ReturnResult",
"$OrderDescription", 
"$OrderID", 
"$TotalPrice", 
"$Currency",
"$Storefront", 
"$TimeStamp", 
"$Tmode", 
"$MID", 
"$Merchant", 
"$add_1",
"$town",
"$country",
"$county",
"$first",
"$name",
"$postcode",
"$email",
"$sadd_1",
"$stown",
"$scountry",
"$scounty",
"$sfirst",
"$sname",
"$spostcode",
"$Mode"),"<hash key>");

 

print ' <form name="checkout_confirmation" action="https://www.cpi.hsbc.com/servlet" method="post">';
print ' <input type="hidden" name="CpiDirectResultUrl" value="'.$DirectResult.'">';
print ' <input type="hidden" name="CpiReturnUrl" value="'.$ReturnResult.'">';
print ' <input type="hidden" name="OrderDesc" value="'.$OrderDescription.'">';
print ' <input type="hidden" name="OrderId" value="'.$OrderID.'">';
print ' <input type="hidden" name="PurchaseAmount" value="'.$TotalPrice.'">';
print ' <input type="hidden" name="PurchaseCurrency" value="'.$Currency.'">';
print ' <input type="hidden" name="StorefrontId" value="'.$Storefront.'">';
print ' <input type="hidden" name="TimeStamp" value="'.$TimeStamp.'">';
print ' <input type="hidden" name="TransactionType" value="'.$Tmode.'">';
print ' <input type="hidden" name="UserId" value="'.$MID.'">';
print ' <input type="hidden" name="MerchantData" value="'.$Merchant.'">';
print '<input type="hidden" name="BillingAddress1" value="'.$add_1.'">
<input type="hidden" name="BillingCity" value="'.$town.'">
<input type="hidden" name="BillingCountry" value="'.$country.'">
<input type="hidden" name="BillingCounty" value="'.$county.'">
<input type="hidden" name="BillingFirstName" value="'.$first.'">
<input type="hidden" name="BillingLastName" value="'.$name.'">
<input type="hidden" name="BillingPostal" value="'.$postcode.'">
<input type="hidden" name="ShopperEmail" value="'.$email.'">
<input type="hidden" name="ShippingAddress1" value="'.$sadd_1.'">
<input type="hidden" name="ShippingCity" value="'.$stown.'">
<input type="hidden" name="ShippingCountry" value="'.$scountry.'">
<input type="hidden" name="ShippingCounty" value="'.$scounty.'">
<input type="hidden" name="ShippingFirstName" value="'.$sfirst.'">
<input type="hidden" name="ShippingLastName" value="'.$sname.'">
<input type="hidden" name="ShippingPostal" value="'.$spostcode.'">';
print ' <input type="hidden" name="Mode" value="'.$Mode.'">';
print ' <input type="hidden" name="OrderHash" value="'.$Hash.'">';
print ' </form>';

Link to comment
Share on other sites

I don't suppose anyone has the technical support helpline number for HSBC CPI handy do they? I can't seem to find it anywhere at the moment.

 

Thanks

 

Andy

 

08456 220 880

 

 

I managed to sort the address problem. I was sending the country text rather than the country code.

Edited by Weirfire
Link to comment
Share on other sites

Have gotten to the strangling monitor stage with this one so if anyone can help it'd be most appreciated:

 

The problem: Am still in testing and can make a test purchase whcicg seems to go through fine - i get the invoice email etc - only the page i get redirected back to from hsbc gives a (bloody annoying) Internal Server Error page.

 

I thought it might be because this page is https://www.mydomain.com/catalog/hsbc.php and not http:// but to be honest I'm all out of both energy and ideas.

 

I'm hosted by UnitedHosting, have installed the module that comes in hsbc_1.1.zip and installed hsbcs files.

 

Any ideas?

Link to comment
Share on other sites

You have to have ssl (either shared or full) to be able to use HSBC e-Secure. If you are getting a 500 Internal Server Error then you have probably set permissions on the file to 777 (full permissions is a risk on file permissions).

 

Vger

Link to comment
Share on other sites

wow - thanks for the quick reply

 

erm, what permissions should they be - for catalog/hsbc.php I take it - they were 664?

 

 

UPDATE: have reset them to 644 and it works!

 

Am very very very happy - thank you Vger!

Edited by eiffel
Link to comment
Share on other sites

hello Vger!

I know i'm very newer and asking very basic things but I'm sure you will guide me in some nice main steps.

i have downloaded the following contribution.

http://www.oscommerce.com/community/contri...all/search,hsbc

HSBC CPI Secure ePayment Card Processing Module 1.1a (w/ GNU license file) by downhom 25nov 2005.

 

1)i copied the 3 hsbc.php files in their exact locations. so my admin---------->module---->payment section is showing the hsbc module.

 

2)I installed this module and put it in the test mode. the values supplied are dummy.

 

3) I have the shared ssl. i have implemented the ssl, all is fine in the catalog section but there are slight problems in the admin section.(e.g some images are not displayed etc.)

 

4) the HSBC says that "the merchant POST (as detailed on page 9)

and the CPI return POST (page 14) both require HTTP1.1/SSL connections to be established with the secure HSBC CPI server."

Do i need a dedicated ssl 3.0 connection. Or the shared will be working????

 

5)How to ssl_secure the CPI return POST???

 

6)I have got the files from the hsbc. I copied the in the cgi_bin the following files from the c-->linux folder::

(i)libCcCpiTools.so (ii)CcOrderHash.e (iii)CcResults.e (iv)TestHash.e

Am I right??

 

7) do i need to copy the files from the include folder (if yes where?) which

are (i)CcCpiTools.h(ii)CcPort01.h(iii)CcStream01.h

 

8)do i need to copy the files from the sample_src folder (if yes where?) which are (i)CcOrderHash.c(ii)CcResults.c(iii)TestHash.c

 

9) do i need to copy the COM folder which incudes CcCpiCOM.dll, CcCpiTools.dll, OrderHash.asp, OrderHash.cfm, results.asp,results.cfm.

if yes where?

 

(10)what is merchant hash? how to execute it etc.

 

11) what are the other neccessities for this integration.

 

my website is www.bathroomsupplies.co.uk

Link to comment
Share on other sites

Hi

 

 

I'm very new to all this and have been asked to

integrate the hsbc cpi into the site, I've downloaded

the module , but am unsure how to install etc,

I am using Apache on Windows XP

if someone here could send me an abc to this

i'd be grateful

 

thanks

Link to comment
Share on other sites

You have to have ssl - either shared or full.

 

You have to have an e-Secure account with HSBC. You can't even test it unless you have an e-Secure account with them.

 

To get an e-Secure account with them you'll need to have been banking with them for at least six months, or if you bank with someone else they'll want references from that bank. It will take some time to get an e-Secure account opened.

 

Vger

Link to comment
Share on other sites

Hi

I'm very new to all this and have been asked to

integrate the hsbc cpi into the site, I've downloaded

the module , but am unsure how to install etc,

I am using Apache on Windows XP

if someone here could send me an abc to this

i'd be grateful

 

thanks

 

 

Oh Dear!

 

You can start at the beginnning of the forum and read all 30 odd pages, or you can get someone who knows how to install it to do the job for you. If you choose the former then you'll be pulling your hair out for a couple of weeks, then you'll wonder why you started down this road, you'll hate the module will generally be very annoyed. Time is a valuable commodity don't waste yours messing about with this module, let someone who knows how to get it working set it up for you and it will be painless excercise.

 

The HSBC contribution is great once it's up and running, I have had no loss of service problems at all for the time that I have been using it.

 

Vger or Ribs are thw two you need to talk to..

 

Regards

 

Sean

Link to comment
Share on other sites

You have to have ssl - either shared or full.

 

You have to have an e-Secure account with HSBC. You can't even test it unless you have an e-Secure account with them.

 

To get an e-Secure account with them you'll need to have been banking with them for at least six months, or if you bank with someone else they'll want references from that bank. It will take some time to get an e-Secure account opened.

 

Vger

 

 

You don't need to have banked with HSBC for six months, I was a new customer HSBC when I joined, they just want you to guarantee any chragebacks that might occur. Contact HSBC, they'll be happy to talk to you.

Link to comment
Share on other sites

When two companies we know approached HSBC they were told they needed to have banked with them for at least six months, or, if they banked elsewhere, to provide refernces from that bank. I guess it's down to who you talk to as to what response you get.

 

Vger

Link to comment
Share on other sites

Hi to everyone i know that i need ssl to run the hsbc contribution, but i have this problem my web is hosted on a server that do not support ssl, so can i buy form a different hosting company lthe ssl certificate like http://www.rapidssl.com/index_ssl.htm and then integrate the contribution.

 

Thank you

Marcello

Link to comment
Share on other sites

The SSL cert you purchase will need to be installed on the webserver hosting the website. My advice would be consider changing hosts to one where they will offer you what you need and help you to get it working. Especially with the HSBC contribution as you will probably have so many challenges along the path to success that you do not need things like that putting in your way before you start.

 

Regards

 

Paul.

Link to comment
Share on other sites

The SSL cert you purchase will need to be installed on the webserver hosting the website. My advice would be consider changing hosts to one where they will offer you what you need and help you to get it working. Especially with the HSBC contribution as you will probably have so many challenges along the path to success that you do not need things like that putting in your way before you start.

 

Regards

 

Paul.

 

 

 

Thank you for your quick replay Paul

 

Can i ask you which is a good hosting that support ssl and is good for the HSBC contribution.

 

Regards

Marcello

Link to comment
Share on other sites

  • 2 weeks later...

Dear Sirs

 

Thank you all on behalf of Innovations UK on this great mod.

 

We use the latest version of the HSBC module (edited by Duane at homeconsulting.com) but they do not contain any of the files refered to in the post above. I.e. We have no modifications to checkout_process.php or a file named hsbc_return.php.

 

We have successfully run HSBC on a previous installation. We now upgraded to a new template and a brand new installation, but i can't get this mod to work.

 

It successsfully goes through the order process, even takes payment, but does not leave no order in the database at all.

 

Can anyone help... I know there was a similar most but that person had a previous version of the module installed.

 

I would be most appreciative of your kind assistance.

 

 

Warmest regards

 

 

Innovations UK

Link to comment
Share on other sites

Hai everyone,

 

I have just installed the oscommerce on my web server, but the problem is that after i select a product and view my shopping cart it's empty, is there any changhes that we need to make shoping_cart.php file after installation.

 

can anybody suggest what's the problem?

 

Regards.......

Link to comment
Share on other sites

I've mangled the checkout confirm file as many ways as i can and still get a transaction error when trying to open the hsbc servlet. HSBC tells me it's a mismatch oin the order hash between me and them. Anyone experienced this?

 

Ted

Link to comment
Share on other sites

Hello all,

 

I think I have a strange problem.

 

down loaded and installed HSBC the newest version, it seems to work fine in test mode (except it does not add an order to the order list in os)

 

When I switch to production, it just comes up with invalid input data?

 

I did not add anything to the CGI Bin, could not see any instruction to do so?

 

Any ideas

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...