HTTP_Request: error?
| From: | Stefan Textor | Date: | Sat, 18 Oct 2003 15:28:24 +0000 |
| Subject: | HTTP_Request: error? | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-8484@lists.php.net to get a copy of this message | ||
hi folks,
while trying to make my paypal sales a bit more secure, i have encountered
a very curious result after all.
i have tried to send to the form data using HTTP_Request server sided to Paypal
and display the result to the user using this script:
include('HTTP/Request.php');
error_reporting(E_NOTICE);
$req = &new HTTP_Request('https://www.paypal.com/cgi-bin/webscr');
$req->setMethod(HTTP_REQUEST_METHOD_POST);
$req->addPostData('cmd', '_ext-enter');
$req->addPostData('redirect_cmd', '_xclick');
$req->addPostData('business','my@email.com');
$req->addPostData('item_name', 'my item');
$req->addPostData('amount', '99.00');
$req->addPostData('currency_code', 'USD');
$req->addPostData('image_url', 'http://www.mydomain.com/mypic1.jpg');
$req->addPostData('no_shipping', '1');
$req->addPostData('return', 'http://www.mydomain.com/thanks.html');
$req->addPostData('cancel_return', 'http://www.mydomain.com/oops.html');
$req->addPostData('no_note', '1');
$req->addPostData('submit', '');
$req->sendRequest();
echo $req->getResponseBody();
the only thing i get is an empty page. no errors at all.
of course on my server i have openssl installed.
what am i doing wrong? or does that behavior pointing to an error?
thanks in forward,
Stefan