This is an updated and fixed UK version of the 2.3.4 version of the HSBC Realex/Global Payments for OsCommerce Phoenix with AVS and SCA support..
Tested up to OSCOM CE Phoenix v1.0.5.0 but probably OK on later versions.
Changes:
Fixed basic typo's and syntax errors of original realex code.
Added UK postcode validation.
Added AVS code for UK. (Only sends postcode data for AVS if UK)
Added validation of Billing and Shipping Line 1 to only send allowed characters. (Stops realex errors)
Added direct currency conversion enable (DCC)
Removes escape characters from Auth code/message so it doesn't upset hash match checking.
Added extra UK zones capability (YA - YI) for Scottish highlands, northern Ireland, channel islands etc.
Forces sending of session cookie to ensure session isn't lost.
Added Realex POST variable logging to file if needed to debug. (Must have/logs/post.log file already existing)
INSTRUCTIONS.
BACKUP BACKUP BACKUP
Install
In before_process.php, fill in correct checkout URL.
Input the secret & merchant-ID in admin.
Advise Realex that call back URL is your before_process.php and that you use MD5 encrpt.
Change URL to sandbox URL in line 26 for testing if needed.