Skip to content

Commit

Permalink
Merge pull request #84 from paypal/revert-endsession-change
Browse files Browse the repository at this point in the history
Revert endsession URL change until endpoint ready
  • Loading branch information
bluk authored Aug 18, 2016
2 parents 67c5879 + c6d24d7 commit 875073a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions lib/PayPal/Auth/Openid/PPOpenIdSession.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public static function getAuthorizationUrl(
$params['state'] = $state;
}

return sprintf("%s/authorize?%s", self::getBaseUrl($config), http_build_query($params));
return sprintf("%s/signin/authorize?%s", self::getBaseUrl($config), http_build_query($params));
}

/**
Expand All @@ -91,7 +91,7 @@ public static function getLogoutUrl($redirectUri, $idToken, $apiContext = null)
'redirect_uri' => $redirectUri,
'logout' => 'true'
);
return sprintf("%s/endsession?%s", self::getBaseUrl($config), http_build_query($params));
return sprintf("%s/webapps/auth/protocol/openidconnect/v1/endsession?%s", self::getBaseUrl($config), http_build_query($params));
}

private static function getBaseUrl($config)
Expand Down
6 changes: 3 additions & 3 deletions lib/PayPal/Core/PPConstants.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ class PPConstants
const PLATFORM_SANDBOX_ENDPOINT = "https://svcs.sandbox.paypal.com/";
const REST_SANDBOX_ENDPOINT = "https://api.sandbox.paypal.com/";
const IPN_SANDBOX_ENDPOINT = "https://www.sandbox.paypal.com/cgi-bin/webscr";
const OPENID_REDIRECT_SANDBOX_URL = "https://www.sandbox.paypal.com/signin";
const OPENID_REDIRECT_SANDBOX_URL = "https://www.sandbox.paypal.com";

const MERCHANT_LIVE_SIGNATURE_ENDPOINT = "https://api-3t.paypal.com/2.0";
const MERCHANT_LIVE_CERT_ENDPOINT = "https://api.paypal.com/2.0";
const PLATFORM_LIVE_ENDPOINT = "https://svcs.paypal.com/";
const REST_LIVE_ENDPOINT = "https://api.paypal.com/";
const IPN_LIVE_ENDPOINT = "https://www.paypal.com/cgi-bin/webscr";
const OPENID_REDIRECT_LIVE_URL = "https://www.paypal.com/signin";
const OPENID_REDIRECT_LIVE_URL = "https://www.paypal.com";

const MERCHANT_TLS_SIGNATURE_ENDPOINT = "https://test-api-3t.sandbox.paypal.com/2.0";
const MERCHANT_TLS_CERT_ENDPOINT = "https://test-api.sandbox.paypal.com/2.0";
const PLATFORM_TLS_ENDPOINT = "https://test-svcs.sandbox.paypal.com/";
const REST_TLS_ENDPOINT = "https://test-api.sandbox.paypal.com/";
const IPN_TLS_ENDPOINT = "https://www.test-sandbox.paypal.com/cgi-bin/webscr";
const OPENID_REDIRECT_TLS_URL = "https://www.test-sandbox.paypal.com/signin";
const OPENID_REDIRECT_TLS_URL = "https://www.test-sandbox.paypal.com";
}
2 changes: 1 addition & 1 deletion tests/Openid/PPOpenIdSessionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public function testLogoutWithCustomConfig() {
$redirectUri = 'http://mywebsite.com';
$idToken = 'abc';

$expectedBaseUrl = "https://www.paypal.com/signin/endsession";
$expectedBaseUrl = "https://www.paypal.com/webapps/auth/protocol/openidconnect/v1/endsession";

$this->assertEquals($expectedBaseUrl . "?id_token=$idToken&redirect_uri=" . urlencode($redirectUri) . "&logout=true",
PPOpenIdSession::getLogoutUrl($redirectUri, $idToken, $this->context), "Failed case - custom config");
Expand Down

0 comments on commit 875073a

Please sign in to comment.