1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
<?php
$ex_message = ""; $ex_detailed_message = ""; $ex_type = "Unknown";
if(isset($ex)) {
$ex_message = $ex->getMessage(); $ex_type = get_class($ex);
if($ex instanceof PPConnectionException) { $ex_detailed_message = "Error connecting to " . $ex->getUrl(); } else if($ex instanceof PPMissingCredentialException || $ex instanceof PPInvalidCredentialException) { $ex_detailed_message = $ex->errorMessage(); } else if($ex instanceof PPConfigurationException) { $ex_detailed_message = "Invalid configuration. Please check your configuration file"; } } ?>
<html> <title>PayPal SDK Sample - Exception</title> <body> <div id="error_info" style="text-align: center;"> <div id="error_title"> <b>SDK Exception</b><br /> <br /> </div> <table style="margin: auto;"> <tr> <td><b>Type</b></td> <td><?php echo $ex_type;?> </td> </tr>
<tr> <td><b>Message</b></td> <td><?php echo $ex_message;?> </td> </tr> <tr> <td><b>Detail</b></td> <td><?php echo $ex_detailed_message;?> </td> </tr>
</table> <br> <a href="index.php">Home</a> </div> </body> </html>
|