From 9d14e2c974299a131bec6cfa1d014d4172756083 Mon Sep 17 00:00:00 2001 From: japatel Date: Tue, 11 Nov 2014 16:13:18 -0600 Subject: [PATCH] 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 --- lib/PayPal/Core/PPHttpConfig.php | 5 ++++- sample/doc/lipp/GetUserInfo.html | 4 ++-- sample/header.html | 4 ++++ sample/lipp/GetUserInfo.php | 4 ++-- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/lib/PayPal/Core/PPHttpConfig.php b/lib/PayPal/Core/PPHttpConfig.php index f9c35da..8a710b0 100644 --- a/lib/PayPal/Core/PPHttpConfig.php +++ b/lib/PayPal/Core/PPHttpConfig.php @@ -26,7 +26,10 @@ class PPHttpConfig CURLOPT_USERAGENT => 'PayPal-PHP-SDK', CURLOPT_HTTPHEADER => array(), 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 ); diff --git a/sample/doc/lipp/GetUserInfo.html b/sample/doc/lipp/GetUserInfo.html index 9213d36..c746507 100644 --- a/sample/doc/lipp/GetUserInfo.html +++ b/sample/doc/lipp/GetUserInfo.html @@ -1,7 +1,7 @@ lipp/GetUserInfo
lipp/GetUserInfo.php
<?php

Obtain Access Token From Refresh Token

require __DIR__ . '/../bootstrap.php'; -use PayPal\Auth\OpenId\PPOpenIdTokenInfo; -use PayPal\Auth\OpenId\PPOpenIdUserInfo;

To obtain User Info, you have to follow three steps in general. +use PayPal\Auth\Openid\PPOpenIdTokenInfo; +use PayPal\Auth\Openid\PPOpenIdUserInfo;

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. This is explained in the example "ObtainUserConsent.php".

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.

Lastly, when you need to retrieve the user information, you need to generate the short lived access token diff --git a/sample/header.html b/sample/header.html index 80c0c49..94555f9 100644 --- a/sample/header.html +++ b/sample/header.html @@ -40,6 +40,10 @@ background-color: #428bca; border-color: #428bca; } + .row { + margin-right: 0px; + margin-left: 0px; + } /* .string { color: green; } .number { color: darkorange; } diff --git a/sample/lipp/GetUserInfo.php b/sample/lipp/GetUserInfo.php index 4c98355..86c465a 100644 --- a/sample/lipp/GetUserInfo.php +++ b/sample/lipp/GetUserInfo.php @@ -3,8 +3,8 @@ // ### Obtain Access Token From Refresh Token require __DIR__ . '/../bootstrap.php'; -use PayPal\Auth\OpenId\PPOpenIdTokenInfo; -use PayPal\Auth\OpenId\PPOpenIdUserInfo; +use PayPal\Auth\Openid\PPOpenIdTokenInfo; +use PayPal\Auth\Openid\PPOpenIdUserInfo; // 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.