> Some time ago, a section of code was posted as an example of
> calling cybercash from php3. It was helpful in getting me started.
>
> I'm now working with cybercash 3.2.0.6. Any chance that you
> could put up a current example (or examples! ) to add some more
> to the work in this area?
>
> Thanks,
> John Paige
This is the best that we have:
if($continueScript)
{
/*
** authorize credit card transaction
*/
//create name of file for output
$filename = uniqid($invoice . "CC");
//build call to cybercash perl script
$command = "C:\\perl\\bin\\perl.exe C:\\inetpub\\authorize_card.pl ";
$command .= "\"$invoice\" ";
$command .= "\"usd " . $totals["Grand"] . "\" ";
$command .= "\"$bill_CreditCardNumber\" ";
$command .= "\"" . $billAddress["FirstName"] . " " .
$billAddress["LastName"] . "\" ";
$command .= "\"" . $billAddress["Address1"] . " " .
$billAddress["Address2"] . "\" ";
$command .= "\"" . $billAddress["City"] . "\" ";
$command .= "\"" . $billAddress["State"] . "\" ";
$command .= "\"" . $billAddress["ZIP"] . "\" ";
$command .= "\"" . $billAddress["Country"] . "\" ";
$command .= "\"$bill_CreditCardExpiration\" "; //has to be like
'12/99'
$command .= ">" . CC_AUTH_PATH . $filename;
exec($command);
if($fp = fopen(CC_AUTH_PATH . $filename, "r"))
{
while($line = fgets($fp, 1024))
{
list($key, $value) = split("\t", $line, 2);
$Authorization[trim($key)] = ereg_replace("\n", "",
trim($value));
}
fclose($fp);
if($Authorization['MStatus'] == 'success')
{
$ActionResults .= "Credit card authorized and
billed!<BR>";
$continueScript = TRUE;
}
else
{
$ActionResults .= "Credit card not authorized!<BR>";
$SCREEN = "order_confirm";
$continueScript = FALSE;
}
}
else
{
$ActionResults .= "Credit card not authorized!<BR>";
$SCREEN = "order_confirm";
$continueScript = FALSE;
}
}
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Site: http://www.working-dogs.com/freetrade/
Problems?: [EMAIL PROTECTED]