Page 1 of 1
EPDQ
Posted: Mon Apr 04, 2005 2:28 pm
by AS_Platinum
Has anyone had any dealing with Barcleys EPDQ at all? (i've googled and googled and theres not much real decent documentation) I am currently working on a project for a client and they are insisting on using EPDQ, ok fair enough! But quite frankly EPDQ's documentation is somewhat carp, i'm not asking for full scripts etc (although that would save alot of time and hassle:D ) but would like to know how you inplemented into your projects (ie: shopping carts)
Cheers
Posted: Wed Apr 27, 2005 8:14 am
by choppsta
I've integrated with ePDQ and found it quite straight forward, well easier than HSBC's anyway!!!
Basically, when displaying your final page before going to the ePDQ server you need to make an HTTP POST of some details behind the scenes. This then returns a special value that you then use in the form. Infact, I think it returns an HTML input tag.
I just used CURL to do that bit:
Code: Select all
$postfields = "clientid=".EPDQ_CLIENTID;
$postfields .= "&password=".EPDQ_PASSPHRASE;
$postfields .= "&oid=".EPDQ_REF_PREFIX.$data["id"];
$postfields .= "&chargetype=PreAuth";
$postfields .= "¤cycode=826";
$postfields .= "&total=".$data["totals"]["total"];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, EPDQ_CRYPT_SERVER);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$epdqdatafield = curl_exec($ch);
curl_close($ch);
You then just add $epdqdatafield to your HTML form.