in reply to Re: get name field from paypal ipn
in thread get name field from paypal ipn

its just a standard paypal ipn, as far as i can tell its just an email with a load of variables in it, see here:

https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_html_IPNandPDTVariables

Thanks

Replies are listed 'Best First'.
Re^3: get name field from paypal ipn
by Anonymous Monk on May 20, 2009 at 13:11 UTC
    here's how (replace '01' with 'first_name'):
    $_ = join q,,,map chr, 33 .. 126; print "$_\n"; print substr($_, index($_,'01'),64),"\n"; __END__
      thank you very much, like this?

      # check for name spaces

      $spos = index($thestr,' ');
      if($spos>=0) { $justmail = ''; } else { $justmail = 1; }

      #
      if($justmail ne 1){
      # get name
      $name = substr($thestr,0,$lbpos-14);

      $_ = join q,,,map chr, 33 .. 126;
      print "$_\n";
      print substr($_, index($_,'first_name'),64),"\n";
      __END__

      # strip quotes
      $name =~ s/\"//g;

      $spos = index($name,' ');
      if($spos>=0){
      $fn = substr($name,0,$spos);
      $ln = substr($name,$spos+1,length($name)-$spos-1);
      } else {
      $fn = $name; $ln = '';
      }
      }
      ok I tried this but just got an error, i have probably got something wrong or put the extra code in the wrong place. thanks
        use your head, you can't just copy/paste blindly