Jump to content


Photo

Problems with response from Paypal server


  • This topic is locked This topic is locked
3 replies to this topic

#1 Julie

Julie

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 30 October 2002 - 12:20 AM

Please, please help. I am trying to process IPN through a perl script and although I am sending the query back exactly as I got it, plus the appended '&cmd=_notify-validate' I seem to keep getting an error from the Paypal server. When I print the response, this is what I see: 'HTTP::Response=HASH(0x82390f0)' although the contents of the parens tends to change. I am using the sample code that paypal provided, and I have checked and double checked it. I am at my wits' end with getting this script to work properly and when I talk to paypal they are not really able to help.
  • Mymnrumourf, xxkalliy, Infevavof and 1 other like this

#2 paypal_pb

paypal_pb

    Advanced Member

  • Members
  • 2,960 posts

Posted 30 October 2002 - 02:25 PM

I believe that indicates that our system is returning the PayPal home page which happens if "cmd=" is not present in the query-string or POST variables. Make sure your code is exactly like this:

# read post from PayPal system and add 'cmd'
read (STDIN, $query, $ENV{'CONTENT_LENGTH'});
$query .= '&cmd=_notify-validate';

# post back to PayPal system to validate
use LWP::UserAgent;
$ua = new LWP::UserAgent;
$req = new HTTP::Request 'POST','http://www.paypal.com/cgi-bin/webscr';
$req->content_type('application/x-www-form-urlencoded');
$req->content($query);
$res = $ua->request($req);

Patrick Breitenbach
PayPal, Inc.
Dev Net: https://www.paypal.com/pdn

#3 Julie

Julie

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 30 October 2002 - 05:08 PM

wow. well thanks for helping me out. it finally worked. apparently, the query should be posted back to an http instead of https. WHICH IS HOW YOU HAVE IT ON YOUR SAMPLE CODE!!!!!! here: https://www.paypal.c...op-outside#perl You guys, I HAVE LITERALLY SPENT TWO WEEKS OF MY LIFE WORKING ON THIS EVERY DAY WITHOUT ANY PROGRESS. exhale. please fix your sample code so that countless other people are not plagued by this. AAAHHHH!



#4 paypal_pb

paypal_pb

    Advanced Member

  • Members
  • 2,960 posts

Posted 30 October 2002 - 07:09 PM

Sorry for the confusion. Either is OK but https requires Crypt::SSLeay as noted. I expect we'll modify the sample code page to make this clearer.

Patrick Breitenbach
PayPal, Inc.
Dev Net: https://www.paypal.com/pdn




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users