Jim Rey wrote: > Alfie > > The code example shows: > > my $ipn = new Business::PayPal::IPN() or die Business::PayPal::IPN->error(); > > # if we come this far, we're guaranteed it was a valid transaction. > if ( $ipn->completed() ) { > > # means the funds are already in our paypal account. > > } elsif ( $ipn->pending() ) { > # the payment was made to your account, but its status is still pending > # $ipn->pending() also returns the reason why it is so. > > > } elsif ( $ipn->denied() ) { > # the payment denied > > } elsif ( $ipn->failed() ) { > # the payment failed > > } > > Obviously, I won't use die because it is generally bad web practice, but > if the returned status is pending, what do you do, resubmit at intervals > using cron job? > > Jim
PayPal will send you a new IPN everytime the status changes - what would you be re-submitting anyway? You just need to deal with the new status when it arrives. This isn't really Mason specific, but I'm not sure where to point you for help, since the PayPal developer forum is populated mostly by idiots - including some of the PayPal staff on there :/ One thing to note with IPN and Mason - you need to make Masons error mode "fatal". The default is to display debugging output, but since this isn't a user accessing your script, you need to ensure that they don't get a 200 responce if your script dies for whatever reason, because PayPal will re-send an IPN if it doesn't get a 200 responce. -Oli
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________ Mason-users mailing list Mason-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mason-users