osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 

OSCommerce and ePDQ

This is a discussion on OSCommerce and ePDQ within the osCommerce 2.2 Modification Help forums, part of the osCommerce 2.2 Forums category; how to modified OScommerce to be able to used it with ePDQ automated Online payment? if someone know how it ...


Go Back   osCommerce and osCMax shopping cart software forums > osCommerce 2.2 Forums > osCommerce 2.2 Modification Help

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Closed Thread

 

LinkBack Thread Tools
  #1  
Old 11-21-2002, 03:52 PM
Anonymous
Guest
 
Posts: n/a
Default OSCommerce and ePDQ

how to modified OScommerce to be able to used it with ePDQ automated Online payment? if someone know how it would be so amazing, if not I will have no choose to use one of their affiliate developement team, which mean not using OScommerce, which suck cause I just LOVE it.

here the files that came with the ePDQ account:

ENCRYPTION file

<?php

#the following function performs a HTTP Post and returns the whole response
function pullpage( $host, $usepath, $postdata = "" ) {

# open socket to filehandle(epdq encryption cgi)
$fp = pfsockopen( $host, 80, &$errno, &$errstr, 60 );

#check that the socket has been opened successfully
if( !$fp ) {
print "$errstr ($errno)<br>\n";
}
else {

#write the data to the encryption cgi
fputs( $fp, "POST $usepath HTTP/1.0\n");
$strlength = strlen( $postdata );
fputs( $fp, "Content-type: application/x-www-form-urlencoded\n" );
fputs( $fp, "Content-length: ".$strlength."\n\n" );
fputs( $fp, $postdata."\n\n" );

#clear the response data
$output = "";


#read the response from the remote cgi
#while content exists, keep retrieving document in 1K chunks
while( !feof( $fp ) ) {
$output .= fgets( $fp, 1024);
}

#close the socket connection
fclose( $fp);
}

#return the response
return $output;
}

#define the remote cgi in readiness to call pullpage function
$server="secure2.epdq.co.uk";
$url="/cgi-bin/CcxBarclaysEpdqEncTool.e";

#the following parameters have been obtained earlier in the merchant's webstore
#clientid, passphrase, oid, currencycode, total
$params="clientid=$clientid";
$params.="&password=$passphrase";
$params.="&oid=$oid";
$params.="&chargetype=Auth";
$params.="&currencycode=$currencycode";
$params.="&total=$total";

#perform the HTTP Post
$response = pullpage( $server,$url,$params );

#split the response into separate lines
$response_lines=explode("\n",$response);

#for each line in the response check for the presence of the string 'epdqdata'
#this line contains the encrypted string
$response_line_count=count($response_lines);
for ($i=0;$i<$response_line_count;$i++){
if (preg_match('/epdqdata/',$response_lines[$i])){
$strEPDQ=$response_lines[$i];
}
}
?>

<FORM action="https://secure2.epdq.co.uk/cgi-bin/CcxBarclaysEpdq.e" method="POST">
<?php print "$strEPDQ"; ?>
<INPUT type="hidden" name="returnurl" value="http://www.store.co.uk/">
<INPUT type="hidden" name="merchantdisplayname" value="My Store">
<INPUT TYPE="submit" VALUE="purchase">
</FORM>

-------------
RESPONCE file

<?php

if (!strcmp(getenv("REQUEST_METHOD"),"POST")){


$path=""; #set your logfile directory path here

$timestamp=date("d-m-y--H-i-s");

$FILE=fopen("$path$timestamp-$oid.txt","a");

fwrite($FILE,"OrderID - $oid\n");

fwrite($FILE,"Transaction Status - $transactionstatus\n");

fwrite($FILE,"Total - $total\n");

fwrite($FILE,"ClientID - $clientid\n");

fwrite($FILE,"Transaction Time Stamp - $datetime\n");

fclose($FILE);

}

?>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Percentage discount voucher with ePDQ system yellowriver osCMax v1.7 General Mods Discussion 0 08-03-2005 05:00 AM
problems with epdq payment limpduck osCommerce 2.2 Modification Help 0 04-13-2005 03:22 PM


All times are GMT -8. The time now is 09:49 AM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax