forked from LiveCarta/PayPal-PHP-SDK
Updated Identity Support from SDK Core
- Moved PPModels required for Identity Support
This commit is contained in:
23
sample/payments/CreateOpenID.php
Normal file
23
sample/payments/CreateOpenID.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
require __DIR__ . '/../bootstrap.php';
|
||||
|
||||
|
||||
$clientId = 'AYSq3RDGsmBLJE-otTkBtM-jBRd1TCQwFf9RGfwddNXWz0uFU9ztymylOhRS';
|
||||
$clientSecret = 'EGnHDxD_qRPdaLdZz8iCr8N7_MzF-YHPTkjs6NKYQvQSBngp4PTTVWkPZRbL';
|
||||
|
||||
$baseUrl = getBaseUrl() . '/ExecuteAuth.php?success=true';
|
||||
|
||||
//Get User Consent
|
||||
$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