Wednesday, 1 April 2009

Getting Transaction details from Paypal in PHP

Below is code for getting transaction details if you are using Paypal for payment purposes. Auto-return and PDT has to be enabled in paypal system for below code to work.
}
else
{
fputs ($fp, $header . $req);
// read the body data
$res = '';
$headerdone = false;
while (!feof($fp))
{
$line = fgets ($fp, 1024);
if (strcmp($line, "\r\n") == 0)
{
// read the header
$headerdone = true;
}
else if ($headerdone)
{
// header has been read. now read the contents
$res .= $line;
}
}
 
// parse the data
$lines = explode("\n", $res);
$keyarray = array();
//print_r($lines);
if (strcmp ($lines[0], "SUCCESS") == 0)
{
for ($i=1; $i

No comments:

Efficient and Reliable UI automation without Selenium

I have been experiencing satisfaction over UI automation efforts after a half-decade of my work in automation. The reason is new age tools ...