Hi TwoWayRadio
I used the About us module to create the extra page require, I figured this would be better than trying to create something myself.
So I installed the About Us module changing all refrences to About Us to Checkout Jump (or similar).
Then in modules/payment/epdq.php (from the EPDQ module)
I changed line (approx) 29 from
Code:
if (is_object($order)) $this->update_status();
$this->form_action_url = 'https://secure2.epdq.co.uk/cgi-bin/CcxBarclaysEpdq.e';
}
to
Code:
if (is_object($order)) $this->update_status();
$this->form_action_url = 'HTTP://YOUR_STORE_URL.COM/index.php?main_page=checkout_jump';
}
Then in the templates/YOUR_TEMPLATE/templates/tpl_checkout_jump_default.php
(what was tpl_about_us_default.php)
I added this code
Code:
<?php
/**
* Page Template
*
* Loaded automatically by index.php?main_page=about_us.<br />
* Displays About Us page.
*
* @package templateSystem
* @copyright Copyright 2003-2005 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: tpl_about_us_default.php v1.3 $
*/
?>
<div class="centerColumn" id="about_us">
<h1 id="aboutUsHeading"><?php echo HEADING_TITLE; ?></h1>
<div id="aboutUsMainContent" class="content">
<img src="https://secure2.epdq.co.uk/CPI2/Main/images/ePDQ-Logo.png" /><br /><br />
<form action="https://secure2.epdq.co.uk/cgi-bin/CcxBarclaysEpdq.e" method="post" name="checkout_confirmation">
<input type="hidden" name="epdqdata" value="<?php echo $_POST['epdqdata']; ?>" />
<input type="hidden" name="returnurl" value="<?php echo $_POST['returnurl']; ?>" />
<input type="hidden" name="merchantdisplayname" value="<?php echo $_POST['merchantdisplayname']; ?>" />
<input type="hidden" name="supportedcardtypes" value="<?php echo $_POST['supportedcardtypes']; ?>" />
<input type="hidden" name="collectdeliveryaddress" value="<?php echo $_POST['collectdeliveryaddress']; ?>" />
<input type="hidden" name="email" value="<?php echo $_POST['email']; ?>" />
<input type="hidden" name="baddr1" value="<?php echo $_POST['baddr1']; ?>" />
<input type="hidden" name="bcity" value="<?php echo $_POST['bcity']; ?>" />
<input type="hidden" name="bcountry" value="<?php echo $_POST['bcountry']; ?>" />
<input type="hidden" name="bpostalcode" value="<?php echo $_POST['bpostalcode']; ?>" />
<input type="hidden" name="btelephonenumber" value="<?php echo $_POST['btelephonenumber']; ?>" />
<script>
document.write ('You will be redirected to the secure server in <span id="seconds">5</span>.');
var seconds = 5;
setInterval(
function(){
if (seconds <= 1) {
document.checkout_confirmation.submit();
}
else {
document.getElementById('seconds').innerHTML = --seconds;
}
},
1000
);
document.write ('<br /><br />If this page does not forward please click here.<br />');
document.write ('<input type="submit" value="Submit">');
</script>
<noscript>
Please Press here to continue to secure server<br />
<input type="submit" value="Submit"></noscript>
</form>
<?php
/**
* require the html_define for the about us page
*/
// require($define_page);
?>
</div>
</div>
So all it does it use the original checkout page variables passing them to the checkout jump page, which then forwards them to the Barcalys EPDQ. As this page is alway static the EPDQ will accept the payments.
Please note there are a couple of code changes that you need to do in the above, URLs etc, you may also need to tweak the form fields.
Hope this helps.
Bookmarks