Gossamer Forum
Home : General : Perl Programming :

Great Perl module - Business::PayPal::IPN

Quote Reply
Great Perl module - Business::PayPal::IPN
Just thought I would post a link:

http://author.handalak.com/archives/072003/000224

Looks like a seriously cool module... especially seeing as the default IPN checking code is pretty crap. I'm giving this module a go in a new script now. I'll let you know how it goes Smile

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Great Perl module - Business::PayPal::IPN In reply to
Doh... I knew I shouldn't have posted anything about this module :p

I've just tried it, and I get the following error;

Quote:
Insufficient content from the invoker:
$Business::PayPal::IPN = bless( {
'ua' => undef,
'_PAYPAL_VARS' => {
'session' => '__65432__'
},
'query' => bless( {
'.charset' => 'ISO-8859-1',
'.parameters' => [
'session'
],
'.fieldnames' => {},
'session' => [
'__65432__'
]
}, 'CGI' )
}, 'Business::PayPal::IPN' );
test at paypal.cgi line 38.

... from this line;

Code:
# decide if the purchase made is valid or not :)
my $ipn = new Business::PayPal::IPN() or die Business::PayPal::IPN->error() ."test";

Anyone got any ideas? I've had a look on Google, but because this is a relativly new module, I can't find anything to do with it :(

TIA

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Great Perl module - Business::PayPal::IPN In reply to
Are you sure you have your IPN settings correct on your PayPal account? From the source on that module it looks like the error means that PayPal didn't send back all the correct info to your script.

~Charlie
Quote Reply
Re: [Chaz] Great Perl module - Business::PayPal::IPN In reply to
Yeah, I'm definate it was activated. I even double checked that the 'hidden' values exist on the page (the one on PayPals site, where you click the button and it takes you to your own site, where the IPN verification is done).

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Great Perl module - Business::PayPal::IPN In reply to
Here is what I'd suggest you do.

Create a simple script (without using Business::PayPal::IPN), which logs the invokation into a log file:

Code:
#!/usr/bin/perl

use strict;
use CGI;
use CGI::Carp ('carpout');

BEGIN {
open(LOG, '>>paypal.log') && carpout(\*LOG);
}
use Data::Dumper;


my $cgi = CGI->new();
print $cgi->header();

warn Dumper( {$cgi->Vars} );


The idea is to see what information PayPal is posting to your script. Depending on how your web server is setup, you may have to create "paypal.log" file and chmod it (and the folder it resides in) to 0777.

If there is something being posted to the script, it will be logged in your "paypal.log" file.

Let me know how it goes.

Last edited by:

sherzodr: Feb 28, 2004, 10:46 AM