YetAnotherForum
Welcome Guest Search | Active Topics | Log In | Register

Paypal - Sandbox - IPN not working Options
ephronsng
#1 Posted : Friday, October 21, 2011 5:50:58 AM
Rank: Starting Member

Groups: Registered

Joined: 10/21/2011
Posts: 1
Hi,

In our site we using PayPal Website Payment Standard to integrated the Payment. Also enabled the IPN for payment notification. But we didn't receive any payment notification from PayPal sandbox site from last month (September 2011). The following is the code snippet we used in our project.

Please help us if any body find a solution for Paypal Sandbox site IPN issue.


switch ($_GET['action']) {

case 'process':

// payment process
break;

case 'success':
// paymetn success

break;

case 'cancel':
// cancel case

break;

case 'ipn':

if ($p->validate_ipn()) {

$subject = 'Instant Payment Notification - Recieved Payment';
$to = 'testpaymentipn@testdomain.com'; // your email
$body = "An instant payment notification was successfully recieved\n";
$body .= "from ".$p->ipn_data['payer_email']." on ".date('m/d/Y');
$body .= " at ".date('g:i A')."\n\nDetails:\n";


foreach ($p->ipn_data as $key => $value) {

$body .= "\n$key: $value";

$fields[] = $key;

$values[] = $value;

}

$str_val = "";

$ncnt = count($values);

for($i=0;$i<$ncnt;$i++)
{
if($i <= ($ncnt-2)) {
$str_val .= "'" . $values[$i] . "',";
} else {
$str_val .= "'" . $values[$i] . "'";
}
}



mail($to, $subject, $body);


} else {

$subject = "Paypal IPN failed - SNG";
$to = "ttestpaymentipn@testdomain.com";
$message_body = "IPN Failed.";
mail($to, $subject, $message_body);
}
break;

}





Thanks,

ephronsng.
Sponsor  
 
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAFVision Theme by Jaben Cargman (Tiny Gecko)
Powered by YAF | YAF © 2003-2009, Yet Another Forum.NET
This page was generated in 0.135 seconds.