forked from LiveCarta/PayPal-PHP-SDK
Fixing handling of PPConnectionException in sample code
This commit is contained in:
@@ -15,7 +15,7 @@ try {
|
||||
// Pass the ID of the sale
|
||||
// transaction from your payment resource.
|
||||
$sale = Sale::get($saleId, $apiContext);
|
||||
} catch (\PPConnectionException $ex) {
|
||||
} catch (PayPal\Exception\PPConnectionException $ex) {
|
||||
echo "Exception:" . $ex->getMessage() . PHP_EOL;
|
||||
var_dump($ex->getData());
|
||||
exit(1);
|
||||
@@ -27,4 +27,4 @@ try {
|
||||
<pre><?php var_dump($sale);?></pre>
|
||||
<a href='../index.html'>Back</a>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user