I've been pulling my hair out on this one for the last couple of days and have an update that might come in handy in the future.
I managed to get the curls code to work however I was not able to make good use of it and will more than likely use PayPal Instant Payment Notification (IPN) to post back a confirmation of successful sale and customer information so that I can send of a branded "thank you" message.
For what it's worth here is the PHP curl() code that actually worked:
PHP Code:
<?php
iF($_SERVER['REQUEST_METHOD'] == "POST"){
$myVariables = 'cs=0'; //Sets page bg color
foreach( $HTTP_POST_VARS as $key=>$value ) {
$myVariables .= "&$key=$value";
}
$myCurl = curl_init();
curl_setopt($myCurl, CURLOPT_URL,"https://www.paypal.com/cgi-bin/webscr");
curl_setopt($myCurl, CURLOPT_POST, 1);
curl_setopt($myCurl, CURLOPT_POSTFIELDS, $myVariables);
curl_exec ($myCurl);
curl_close ($myCurl);
} else {
header("Location: index.php");
}
?>
It grabs the posted values and posts them to PayPal. The browser is somewhere between Paypal and your domain so the page shows most of the information however it needs some work.
Maybe this will help out someone else in the future.
See ya,
Bookmarks