View Single Post
Old 09-01-2005, 09:21 AM
a.harris a.harris is offline

Join Date: Aug 2005
Posts: 13

Default HSBC Secure ePayments API

If you are willing to do a little work, you'll be pleasently surprised that you can use the fully integrated ClearCommerce module as a base to link into the HSBC Secure ePayments API.

This means that clients do not get redirected to the HSBC website as part of the order process.

It works out the box for Visa and Mastercard, and requires a little bit of modification for Switch/Solo.

For config options:
Name = Username (normally your surname) Password = Password Client ID = 4 digit store ID (login to secure epayments and look at the top header) Test Server = Live Server = Order Prefix = Blank
You also need to change one line (#45) in payment/cc_fuse.php:

$port = ($module_params["testmode"]=="N" ? 443 : 11500);
$port = ($module_params["testmode"]=="N" ? 443 : 443);
That's it! Enjoy the wonderful word of HSBC API.

If you would like to add Switch/Solo support; make the following changes to payment/cc_fuse.php:

Line 53: Add the following:
if ($userinfo["card_type"] == "VISA") { $card_type = "1"; } elseif ($userinfo["card_type"] == "MC") { $card_type = "2"; } elseif ($userinfo["card_type"] == "SW") { $card_type = "10"; } elseif ($userinfo["card_type"] == "SO") { $card_type = "9"; } elseif ($userinfo["card_type"] == "UKE") { $card_type = "11"; }

Line 67 (on original document - next line after "$post[] = "<Expires...":
$post[] = "<IssueNum>".$userinfo["card_issue_no"]."</IssueNum>"; $post[] = "<StartDate DataType=\"StartDate\" Locale=\"840\">".substr($userinfo["card_valid_from"],0,2)."/".substr($userinfo["card_valid_from"],2,2)."</StartDate>"; $post[] = "<Type>".$card_type."</Type>";

You will need to enable:

Enable 'Issue Number' and 'Valid from' fields in the CC info form

In General Settings.
Reply With Quote