Permalink
Browse files

Merge pull request #4 from richhl/master

bug fixed in a call to paypal CallerServices
  • Loading branch information...
2 parents 6ca07c1 + b149d05 commit 42bfa80cb76265c515d40f440b0a887647c0068d @schmittjoh committed Sep 27, 2011
Showing with 7 additions and 6 deletions.
  1. +7 −6 lib/providers/paypal/jmsPaypalPaymentMethod.class.php
@@ -386,21 +386,22 @@ public function getCallerServices()
$caller = PayPal::getCallerServices($profile);
+
+ if (PayPal::isError($caller))
+ throw new RuntimeException('The API Caller could not be initialized: '
+ .$caller->getMessage());
+
// if we are in debug mode, ignore any invalid SSL certificates
// TODO: Check if we also need this in production
if ($this->isDebug())
{
$caller->setOpt('curl', CURLOPT_SSL_VERIFYPEER, 0);
$caller->setOpt('curl', CURLOPT_SSL_VERIFYHOST, 0);
}
-
- if (PayPal::isError($caller))
- throw new RuntimeException('The API Caller could not be initialized: '
- .$caller->getMessage());
-
+
$this->_callerServices = $caller;
}
return $this->_callerServices;
}
-}
+}

0 comments on commit 42bfa80

Please sign in to comment.