forked from LiveCarta/PayPal-PHP-SDK
Fixing Breaking Changes in ItemList
This commit is contained in:
20
sample/oauth/ObtainUserConsent.php
Normal file
20
sample/oauth/ObtainUserConsent.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
require __DIR__ . '/../bootstrap.php';
|
||||
|
||||
$baseUrl = getBaseUrl() . '/UserConsentRedirect.php?success=true';
|
||||
|
||||
//Get User Consent
|
||||
// The clientId is stored in the bootstrap file
|
||||
$redirectUrl = \PayPal\Auth\Openid\PPOpenIdSession::getAuthorizationUrl(
|
||||
$baseUrl,
|
||||
array('profile', 'email', 'phone'),
|
||||
$clientId,
|
||||
null,
|
||||
null,
|
||||
$apiContext
|
||||
);
|
||||
|
||||
header("Location: $redirectUrl");
|
||||
exit;
|
||||
|
||||
Reference in New Issue
Block a user