ePDQ widget 404 fix

Hi
On testing the ePDQ widget with a production merchant I was receiving a 404 error when being passed to Barlcays.

The root cause was the difference between Test and Production environments. In the widget both Test and Prod were pointing to the Test url: Payment confirmation

I’ve fixed this in code studio by opening the main.js for Barclaycard Payment widget and editing the line;

var payment_url = ‘https://mdepayments.epdq.co.uk/ncol/‘+widget.get_setting(‘account_mode’)+’/orderstandard_utf8.asp’;

to:

var account_mode_url = widget.get_setting(‘account_mode’);
var payment_url;
if(account_mode_url == ‘prod’){
payment_url = ‘https://payments.epdq.co.uk/ncol/‘+account_mode_url+’/orderstandard_utf8.asp’;
}
else{
payment_url = ‘https://mdepayments.epdq.co.uk/ncol/‘+account_mode_url+’/orderstandard_utf8.asp’;
}

My code probably isn’t very elegant but this got me working.

Hi @CraigBarker_Cumbria
I believe we’ve sent you the new patch? We’ve also published the fixed version.
Hope that’s all ok now?
Cheers, Tony

Hi @tony.norman
Thanks for the assistance we received for this. After self fixing the Prod URL issue, I worked with @pavel.kolev on a couple of extra improvements.

  • The widget now works nicely in webpages
  • The widget can handle ePDQ passing values back where spaces are replaced with +

This widget was used as part of a quick fix to allow our Adult Education courses to be delivered online via video conference, with online enrolment and fee payment. (2 days from briefing to LIVE on the Liberty Create part).

Not a development schedule I’d like to make a habit of and some colleagues will certainly owe us one.

Cheers
Craig

1 Like

Impressive, glad we could help Craig.