Page 1 of 1

constructing SHASign for a return page for a payment centre

Posted: Mon Jun 03, 2013 6:30 am
by jonnyfortis
I have a gateway set up with Barclaycard EPDQ. when the payment I have set up the return to either ACCEPTURL , DECLINEURL , EXCEPTIONURL or CANCELURL. i have been told on these pages i need to

" ePDQ will send back the transaction result parameters and values along with the SHASign ePDQ has created using these parameters and values and the SHA-OUT passphrase set in the ePDQ back office.

You must then take these parameters and values and concatenate them alphabetically appending your SHA-OUT passphrase at the end of each parameter and value – once the you have created the SHASign you must then compare the SHASign you have created with the SHASign ePDQ has created and if they match you can then perform the end of order process such as updating your database etc. "

i have the pages setup and whatever page is called for either accept.php, decline.php, exception.php or cancel.php i can then make the correct ammendments to the DB.

i dont really know where to start, has anyone done this already?

thanks in advance

Re: constructing SHASign for a return page for a payment cen

Posted: Mon Jun 03, 2013 3:48 pm
by mecha_godzilla
Hi,

I haven't done this before, but the main issue seems to be the generation of the SHASign - the suggestion is that you need to generate this value from within your own scripts using the same function that Barclaycard uses on their system, so they should have supplied you with the code to do that. The requirement to order all the parameters alphabetically suggests that the SHASign value is just a one-way hash, but they could be using SHA-1, SHA-256, SHA-512 or doing something non-standard.

There is some information on the following site that might be of use:

http://www.whiteroomsolutions.com/2012/ ... php-class/

HTH,

Mecha Godzilla

Re: constructing SHASign for a return page for a payment cen

Posted: Tue Jun 04, 2013 6:41 am
by jonnyfortis
hello thanks for that. I already have the gateway set up. its the return i am having an issue with

the SHASign that i am trying to construct is different from the return URL