Answer the question
In order to leave comments, you need to log in
Why doesn't the PayPal curl request work?
In general, such a disaster: everything works fine on the PayPal test server, but there is a problem on the real server.
$data = array(
'cmd' => '_notify-synch',
'tx' => $pdt_tx,
'at' => $PDT_TOKEN
);
$opts = array(
CURLOPT_URL => 'https://www.paypal.com/cgi-bin/webscr',
CURLOPT_HEADER => 0,
CURLOPT_NOBODY => 0,
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_POST => 1,
CURLOPT_FOLLOWLOCATION => 1,
CURLOPT_SSL_VERIFYPEER => 1,
CURLOPT_POSTFIELDS => http_build_query($data),
CURLOPT_VERBOSE => true
);
$curlHandler = curl_init();
curl_setopt_array( $curlHandler, $opts );
$output = curl_exec($curlHandler);
curl_close($curlHandler);
Answer the question
In order to leave comments, you need to log in
Problem solved. For anyone who might be looking for a solution
, paypal has a battle url like this:
paypal.com/webscr
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question