This repository has been archived on 2026-04-06. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
PayPal-PHP-SDK/sample/payments/CreateOpenID.php
japatel dc2ac0fd63 Updated Identity Support from SDK Core
- Moved PPModels required for Identity Support
2014-10-14 14:15:41 -05:00

24 lines
507 B
PHP

<?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;