Forums / Addon Payment Modules / Barclays EPDQ - allowed URL problem

Barclays EPDQ - allowed URL problem

Locked
Results 1 to 11 of 11
This thread is locked. New replies are disabled.
22 Jan 2010, 15:52
#1
togfather avatar

togfather

New Zenner

Join Date:
Dec 2009
Posts:
76
Plugin Contributions:
0

Barclays EPDQ - allowed URL problem

I have set up the Barclays EPDQ MOdule but when I try to checkout, I get the message:
=====

Sorry, there has been a problem processing your payment.

Not a valid allowed URL
===

The url of th epage with the checkout button is:
https://pegasus.terrassl.net/~kellyspe/index.php?main_page=checkout_confirmation

The url entered in the Barclaycard system is:
https://pegasus.terrassl.net/~kellyspe/index.php?main_page=checkout_confirmation

(per the module installation instructions)

Does anyone know what I have done wrong?

Regards

Tog
22 Jan 2010, 17:40
#2
misty avatar

misty

Inactive

Join Date:
Apr 2004
Posts:
5,752
Plugin Contributions:
1

Re: Barclays EPDQ - allowed URL problem

Scroll down this page...links to similar topics which may help
22 Jan 2010, 18:00
#3
togfather avatar

togfather

New Zenner

Join Date:
Dec 2009
Posts:
76
Plugin Contributions:
0

Re: Barclays EPDQ - allowed URL problem

Hello Misty,

I have already ploughed through those and many other threads, but nothing gives me the answer. It appears that Zen Cart creates dynamic urls for the checkout, but Barclay's does not accept them. If I create an order in zencart and got to the final checkout page, then paste that url into Barclay's system as the allowed url, wait fifteen minutes and press the continue button on zen cart - it works! Takes me to barclaycard page asking for card details. Using the dummy card number given by Bartclaycard, I then get the correct transaction declined notice.

However, If I then raise a new order in zen cart and checkout, instead of the correct barclaycard entry page, I get the Allowed URL invalid message again, because the last part of the sending url has been changed by Zen cart.

How can I fix this?

Best regards

Tog
22 Jan 2010, 18:40
#4
misty avatar

misty

Inactive

Join Date:
Apr 2004
Posts:
5,752
Plugin Contributions:
1

Re: Barclays EPDQ - allowed URL problem

Dont use Barclays myself, so can only hope either zencart coder reads this thread OR suggest posting in COMMERCIAL Forum...
22 Jan 2010, 19:55
#5
togfather avatar

togfather

New Zenner

Join Date:
Dec 2009
Posts:
76
Plugin Contributions:
0

Re: Barclays EPDQ - allowed URL problem

I was hoping that the person who wrote the add-on module would reply. or someone who has the mod running and working.

Regards

Tog
28 Sep 2010, 10:36
#6
steveyork136 avatar

steveyork136

New Zenner

Join Date:
Nov 2005
Posts:
84
Plugin Contributions:
0

Re: Barclays EPDQ - allowed URL problem

Hi Togfather,

Not sure if this is too late but I found a solution to this.

I created a intermediate page to forward the information to Barclays.

Goes like this
Checkout Confirm page.

Checkout Continue Page. (my created page, which has static url)

Barclays.


The Checkout Continue Page gets the variables I need from the checkout page and posts them to Barclays, the page is set to auto forward after 3-4 seconds with a manual link if it doesn't.

Its not pretty, but it works and as my bank uses it when I pay my credit card bill its not a unknow process.

If you need any more help drop me a line and I'll send you more info.
21 Oct 2010, 14:05
#7
twowayradio avatar

twowayradio

New Zenner

Join Date:
Oct 2010
Posts:
32
Plugin Contributions:
0

Re: Barclays EPDQ - allowed URL problem

steveyork136:

Hi Togfather,

Not sure if this is too late but I found a solution to this.

I created a intermediate page to forward the information to Barclays.

Goes like this
Checkout Confirm page.

Checkout Continue Page. (my created page, which has static url)

Barclays.


The Checkout Continue Page gets the variables I need from the checkout page and posts them to Barclays, the page is set to auto forward after 3-4 seconds with a manual link if it doesn't.

Its not pretty, but it works and as my bank uses it when I pay my credit card bill its not a unknow process.

If you need any more help drop me a line and I'll send you more info.


Hi Steve,

I've got the same problem - could you paste the code you are using in your page to pass the parameters to barclays? :-)
25 Oct 2010, 12:07
#8
steveyork136 avatar

steveyork136

New Zenner

Join Date:
Nov 2005
Posts:
84
Plugin Contributions:
0

Re: Barclays EPDQ - allowed URL problem

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


 if (is_object($order)) $this->update_status();
      $this->form_action_url = 'https://secure2.epdq.co.uk/cgi-bin/CcxBarclaysEpdq.e';
}



to


 
 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


<?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.
25 Oct 2010, 15:39
#9
twowayradio avatar

twowayradio

New Zenner

Join Date:
Oct 2010
Posts:
32
Plugin Contributions:
0

Re: Barclays EPDQ - allowed URL problem

steveyork136:

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


Then in the templates/YOUR_TEMPLATE/templates/tpl_checkout_jump_default.php

(what was tpl_about_us_default.php)
I added this code


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.


Cheers Stevey. I got this working and it did the trick, the only issue is now because we stripped the zenid get variable from the outgoing post (to satisfy Barclays since they don't accept dynamic URL's) the return post doesn't include it so Zen Cart can't match up the session - forcing a zen cart Whoops, session time out error.

Have you experienced this at all?
08 Nov 2010, 15:44
#10
steveyork136 avatar

steveyork136

New Zenner

Join Date:
Nov 2005
Posts:
84
Plugin Contributions:
0

Re: Barclays EPDQ - allowed URL problem

Hi TwoWayRadio,

Yes we had some issue with session errors but I was also trying to set the site up using a shared SSL (not my choice) so some of the issues may have been related to that, I know the site works now so whatever combination we hit upon did the trick.

Here what we have on the Configuation for Sessions, see if this helps.


Cookie Domain: True
Force Cookie Use: False
Check SSL Session ID: False
Check User Agent: False
Check IP Address: False
Prevent Spider Sessions: True
Recreate Session: False
IP to Host Conversion Status: true
25 Nov 2010, 11:42
#11
twowayradio avatar

twowayradio

New Zenner

Join Date:
Oct 2010
Posts:
32
Plugin Contributions:
0

Re: Barclays EPDQ - allowed URL problem

steveyork136:

Hi TwoWayRadio,

Yes we had some issue with session errors but I was also trying to set the site up using a shared SSL (not my choice) so some of the issues may have been related to that, I know the site works now so whatever combination we hit upon did the trick.

Here what we have on the Configuation for Sessions, see if this helps.


Cookie Domain: True
Force Cookie Use: False
Check SSL Session ID: False
Check User Agent: False
Check IP Address: False
Prevent Spider Sessions: True
Recreate Session: False
IP to Host Conversion Status: true


Yep, us too. It seems the module doesn't like the shared SSL :unsure:

In the end did you get this working on shared SSL or did you opt for another hosting config?