Skip to content

Commit

Permalink
*7188* Add CURL error information to paypal dump
Browse files Browse the repository at this point in the history
  • Loading branch information
asmecher committed Mar 1, 2012
1 parent 9a66f15 commit 4ee124a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plugins/paymethod/paypal/PayPalPlugin.inc.php
Expand Up @@ -184,6 +184,7 @@ function handle($args, &$request) {
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/x-www-form-urlencoded', 'Content-Length: ' . strlen($req)));
curl_setopt($ch, CURLOPT_POSTFIELDS, $req);
$ret = curl_exec ($ch);
$curlError = curl_error($ch);
curl_close ($ch);

// Check the confirmation response and handle as necessary.
Expand Down Expand Up @@ -295,7 +296,7 @@ function handle($args, &$request) {
$mail->assignParams(array(
'journalName' => $journal->getLocalizedTitle(),
'postInfo' => print_r($_POST, true),
'additionalInfo' => "Confirmation return: $ret",
'additionalInfo' => "Confirmation return: $ret\nCURL error: $curlError",
'serverVars' => print_r($_SERVER, true)
));
$mail->send();
Expand Down

0 comments on commit 4ee124a

Please sign in to comment.