forked from LiveCarta/PayPal-PHP-SDK
Updated HttpConfig to use TLSv1 as Cipher List
- Updated PPHttpConfig.php with Cipher List - Updated Lipp Samples to use proper namespaces. Fixes #156 - Few UI Fixes
This commit is contained in:
@@ -26,7 +26,10 @@ class PPHttpConfig
|
|||||||
CURLOPT_USERAGENT => 'PayPal-PHP-SDK',
|
CURLOPT_USERAGENT => 'PayPal-PHP-SDK',
|
||||||
CURLOPT_HTTPHEADER => array(),
|
CURLOPT_HTTPHEADER => array(),
|
||||||
CURLOPT_SSL_VERIFYHOST => 2,
|
CURLOPT_SSL_VERIFYHOST => 2,
|
||||||
CURLOPT_SSL_VERIFYPEER => 1
|
CURLOPT_SSL_VERIFYPEER => 1,
|
||||||
|
CURLOPT_SSL_CIPHER_LIST => 'TLSv1'
|
||||||
|
//Allowing TLSv1 cipher list.
|
||||||
|
//Adding it like this for backward compatibility with older versions of curl
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<!DOCTYPE html><html lang="en"><head><title>lipp/GetUserInfo</title></head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"><meta name="groc-relative-root" content="../"><meta name="groc-document-path" content="lipp/GetUserInfo"><meta name="groc-project-path" content="lipp/GetUserInfo.php"><link rel="stylesheet" type="text/css" media="all" href="../assets/style.css"><script type="text/javascript" src="../assets/behavior.js"></script><body><div id="meta"><div class="file-path">lipp/GetUserInfo.php</div></div><div id="document"><div class="segment"><div class="code"><div class="wrapper"><span class="hljs-preprocessor"><?php</span></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h3 id="obtain-access-token-from-refresh-token">Obtain Access Token From Refresh Token</h3></div></div></div><div class="segment"><div class="code"><div class="wrapper"><span class="hljs-keyword">require</span> <span class="hljs-keyword">__DIR__</span> . <span class="hljs-string">'/../bootstrap.php'</span>;
|
<!DOCTYPE html><html lang="en"><head><title>lipp/GetUserInfo</title></head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"><meta name="groc-relative-root" content="../"><meta name="groc-document-path" content="lipp/GetUserInfo"><meta name="groc-project-path" content="lipp/GetUserInfo.php"><link rel="stylesheet" type="text/css" media="all" href="../assets/style.css"><script type="text/javascript" src="../assets/behavior.js"></script><body><div id="meta"><div class="file-path">lipp/GetUserInfo.php</div></div><div id="document"><div class="segment"><div class="code"><div class="wrapper"><span class="hljs-preprocessor"><?php</span></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h3 id="obtain-access-token-from-refresh-token">Obtain Access Token From Refresh Token</h3></div></div></div><div class="segment"><div class="code"><div class="wrapper"><span class="hljs-keyword">require</span> <span class="hljs-keyword">__DIR__</span> . <span class="hljs-string">'/../bootstrap.php'</span>;
|
||||||
|
|
||||||
<span class="hljs-keyword">use</span> <span class="hljs-title">PayPal</span>\<span class="hljs-title">Auth</span>\<span class="hljs-title">OpenId</span>\<span class="hljs-title">PPOpenIdTokenInfo</span>;
|
<span class="hljs-keyword">use</span> <span class="hljs-title">PayPal</span>\<span class="hljs-title">Auth</span>\<span class="hljs-title">Openid</span>\<span class="hljs-title">PPOpenIdTokenInfo</span>;
|
||||||
<span class="hljs-keyword">use</span> <span class="hljs-title">PayPal</span>\<span class="hljs-title">Auth</span>\<span class="hljs-title">OpenId</span>\<span class="hljs-title">PPOpenIdUserInfo</span>;</div></div></div><div class="segment"><div class="comments "><div class="wrapper"><p>To obtain User Info, you have to follow three steps in general.
|
<span class="hljs-keyword">use</span> <span class="hljs-title">PayPal</span>\<span class="hljs-title">Auth</span>\<span class="hljs-title">Openid</span>\<span class="hljs-title">PPOpenIdUserInfo</span>;</div></div></div><div class="segment"><div class="comments "><div class="wrapper"><p>To obtain User Info, you have to follow three steps in general.
|
||||||
First, you need to obtain user's consent to retrieve the information you want.
|
First, you need to obtain user's consent to retrieve the information you want.
|
||||||
This is explained in the example "ObtainUserConsent.php".</p></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><p>Once you get the user's consent, the end result would be long lived refresh token.
|
This is explained in the example "ObtainUserConsent.php".</p></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><p>Once you get the user's consent, the end result would be long lived refresh token.
|
||||||
This refresh token should be stored in a permanent storage for later use.</p></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><p>Lastly, when you need to retrieve the user information, you need to generate the short lived access token
|
This refresh token should be stored in a permanent storage for later use.</p></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><p>Lastly, when you need to retrieve the user information, you need to generate the short lived access token
|
||||||
|
|||||||
@@ -40,6 +40,10 @@
|
|||||||
background-color: #428bca;
|
background-color: #428bca;
|
||||||
border-color: #428bca;
|
border-color: #428bca;
|
||||||
}
|
}
|
||||||
|
.row {
|
||||||
|
margin-right: 0px;
|
||||||
|
margin-left: 0px;
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
.string { color: green; }
|
.string { color: green; }
|
||||||
.number { color: darkorange; }
|
.number { color: darkorange; }
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
// ### Obtain Access Token From Refresh Token
|
// ### Obtain Access Token From Refresh Token
|
||||||
require __DIR__ . '/../bootstrap.php';
|
require __DIR__ . '/../bootstrap.php';
|
||||||
|
|
||||||
use PayPal\Auth\OpenId\PPOpenIdTokenInfo;
|
use PayPal\Auth\Openid\PPOpenIdTokenInfo;
|
||||||
use PayPal\Auth\OpenId\PPOpenIdUserInfo;
|
use PayPal\Auth\Openid\PPOpenIdUserInfo;
|
||||||
|
|
||||||
// To obtain User Info, you have to follow three steps in general.
|
// To obtain User Info, you have to follow three steps in general.
|
||||||
// First, you need to obtain user's consent to retrieve the information you want.
|
// First, you need to obtain user's consent to retrieve the information you want.
|
||||||
|
|||||||
Reference in New Issue
Block a user