forked from LiveCarta/PayPal-PHP-SDK
Fixing handling of PPConnectionException in sample code
This commit is contained in:
@@ -70,7 +70,7 @@ $payment->setTransactions(array($transaction));
|
||||
// The return object contains the status;
|
||||
try {
|
||||
$payment->create($apiContext);
|
||||
} catch (\PPConnectionException $ex) {
|
||||
} catch (PayPal\ExceptionPayPal\Exception\PPConnectionException $ex) {
|
||||
echo "Exception: " . $ex->getMessage() . PHP_EOL;
|
||||
var_dump($ex->getData());
|
||||
exit(1);
|
||||
@@ -85,4 +85,4 @@ try {
|
||||
<pre><?php var_dump($payment->toArray());?></pre>
|
||||
<a href='../index.html'>Back</a>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user