forked from LiveCarta/PayPal-PHP-SDK
Renaming Namespaces and Organizing Classes
- Updated OpenId classes to be in API namespace - Updated PP Naming Convention to PayPal Naming Convention - FormatConverter Class got its own namespace - Handlers are grouped in Handler namespace - Samples and Tests Updated Accordingly
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
|
||||
require __DIR__ . '/../bootstrap.php';
|
||||
|
||||
use PayPal\Auth\Openid\PPOpenIdTokeninfo;
|
||||
use PayPal\Exception\PPConnectionException;
|
||||
use PayPal\Api\OpenIdTokeninfo;
|
||||
use PayPal\Exception\PayPalConnectionException;
|
||||
|
||||
session_start();
|
||||
|
||||
@@ -16,8 +16,8 @@ if (isset($_GET['success']) && $_GET['success'] == 'true') {
|
||||
|
||||
try {
|
||||
// Obtain Authorization Code from Code, Client ID and Client Secret
|
||||
$accessToken = PPOpenIdTokeninfo::createFromAuthorizationCode(array('code' => $code), null, null, $apiContext);
|
||||
} catch (PPConnectionException $ex) {
|
||||
$accessToken = OpenIdTokeninfo::createFromAuthorizationCode(array('code' => $code), null, null, $apiContext);
|
||||
} catch (PayPalConnectionException $ex) {
|
||||
ResultPrinter::printError("Obtained Access Token", "Access Token", null, $_GET['code'], $ex);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user