in reply to Re^3: A regexp from paypal
in thread A regexp from paypal
I need to add the cmd = _notify-validate name, value pair to the post string and then send it back out using LWP. When I send it out I am sending the CGI object itself out. ---- Now, here is some code that seems to do the trick well but I want to use the CGI module to do this (if possible) This is not my code, it is paypal's#!/usr/bin/perl use strict; use CGI; use CGI::Carp qw(fatalsToBrowser); my $q = new CGI; $q->param(-name=>'cmd',-value=>'_notify-validate'); # read post from PayPal system and add 'cmd' #read (STDIN, my $query, $ENV{'CONTENT_LENGTH'}); #$query .= '&cmd=_notify-validate'; # post back to PayPal system to validate use LWP::UserAgent; my ($ua,$req,$res); $ua = new LWP::UserAgent; $req = new HTTP::Request 'POST','http://www.eliteweaver.co.uk/testing/ +ipntest.php'; $req->content_type('application/x-www-form-urlencoded'); $req->content($q); $res = $ua->request($req);
# 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);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: A regexp from paypal
by Cubes (Pilgrim) on Nov 25, 2007 at 23:42 UTC | |
by Anonymous Monk on Nov 26, 2007 at 03:52 UTC | |
by Cubes (Pilgrim) on Nov 26, 2007 at 09:39 UTC | |
by davidov0009 (Scribe) on Dec 08, 2007 at 22:39 UTC |