From 3ceebc637d78b1257227095a2cbfeff202152243 Mon Sep 17 00:00:00 2001 From: Bryant Luk Date: Thu, 7 Jan 2016 15:05:36 -0600 Subject: [PATCH 1/6] Add PHP 7.0 to Travis-CI tested PHP versions --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index fb6a6aec..583b7f93 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,7 @@ php: - 5.4 - 5.5 - 5.6 +- 7.0 - hhvm matrix: allow_failures: From 7f8ebae5e7727d2b63e92fa71328b6de52041466 Mon Sep 17 00:00:00 2001 From: Bryant Luk Date: Thu, 7 Jan 2016 15:18:53 -0600 Subject: [PATCH 2/6] Ensure backwards compatible behavior with PHP5 --- lib/PayPal/Validation/JsonValidator.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/PayPal/Validation/JsonValidator.php b/lib/PayPal/Validation/JsonValidator.php index 9f064ed1..11592377 100644 --- a/lib/PayPal/Validation/JsonValidator.php +++ b/lib/PayPal/Validation/JsonValidator.php @@ -21,6 +21,9 @@ public static function validate($string, $silent = false) { @json_decode($string); if (json_last_error() != JSON_ERROR_NONE) { + if ($string === '' || $string === null) { + return true; + } if ($silent == false) { //Throw an Exception for string or array throw new \InvalidArgumentException("Invalid JSON String"); From b26411b4ef2f365e8c39a6dd6327c45620aa1be7 Mon Sep 17 00:00:00 2001 From: Jay Date: Mon, 11 Jan 2016 12:02:46 -0600 Subject: [PATCH 3/6] Update PCI Mandate Docs --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 576d3d1b..06a5f7f5 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ __Welcome to PayPal PHP SDK__. This repository contains PayPal's PHP SDK and sam > **Before starting to use the sdk, please be aware of the [existing issues and currently unavailable or upcoming features](https://github.com/paypal/rest-api-sdk-python/wiki/Existing-Issues-and-Unavailable%5CUpcoming-features) for the REST APIs. (which the sdks are based on)** ## Please Note -> **The [PCIv3.1 DSS (PDF)](https://www.pcisecuritystandards.org/documents/PCI_DSS_v3-1.pdf) mandates (p.46) that TLSv1.0 be retired from service by June 30, 2016. All organizations that handle credit card information are required to comply with this standard. As part of this obligation, PayPal is updating it's services to require TLSv1.2 for all HTTPS connections. [Click here](https://github.com/paypal/tls-update) for more information** +> **The Payment Card Industry (PCI) Council has [mandated](http://blog.pcisecuritystandards.org/migrating-from-ssl-and-early-tls) that early versions of TLS be retired from service. All organizations that handle credit card information are required to comply with this standard. As part of this obligation, PayPal is updating its services to require TLS 1.2 for all HTTPS connections. At this time, PayPal will also require HTTP/1.1 for all connections. [Click here](https://github.com/paypal/tls-update) for more information** > **If you have the SDK v1.6.2 or higher installed, you can easily test this by running the [TLSCheck sample](sample/tls/TlsCheck.php).** From 3b7f36c379937907633dc1f1945974998e8f6fbe Mon Sep 17 00:00:00 2001 From: tobeorla Date: Wed, 20 Jan 2016 17:10:46 +0100 Subject: [PATCH 4/6] SSL connect error https://github.com/paypal/PayPal-PHP-SDK/issues/474 --- lib/PayPal/Core/PayPalHttpConfig.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PayPal/Core/PayPalHttpConfig.php b/lib/PayPal/Core/PayPalHttpConfig.php index 3864a96b..6bd4454c 100644 --- a/lib/PayPal/Core/PayPalHttpConfig.php +++ b/lib/PayPal/Core/PayPalHttpConfig.php @@ -19,7 +19,7 @@ class PayPalHttpConfig * @var array */ public static $defaultCurlOptions = array( - CURLOPT_SSLVERSION => 1, + CURLOPT_SSLVERSION => 6, CURLOPT_CONNECTTIMEOUT => 10, CURLOPT_RETURNTRANSFER => TRUE, CURLOPT_TIMEOUT => 60, // maximum number of seconds to allow cURL functions to execute From 2569c696a8504f2b7337a73c5a64b4107a88d137 Mon Sep 17 00:00:00 2001 From: Jay Patel Date: Wed, 20 Jan 2016 23:04:01 +0530 Subject: [PATCH 5/6] Sample code to show how to override default curl options --- sample/bootstrap.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sample/bootstrap.php b/sample/bootstrap.php index 6d1513bb..bfdda9b8 100644 --- a/sample/bootstrap.php +++ b/sample/bootstrap.php @@ -33,6 +33,14 @@ $clientId = 'AYSq3RDGsmBLJE-otTkBtM-jBRd1TCQwFf9RGfwddNXWz0uFU9ztymylOhRS'; $clientSecret = 'EGnHDxD_qRPdaLdZz8iCr8N7_MzF-YHPTkjs6NKYQvQSBngp4PTTVWkPZRbL'; +/** + * All default curl options are stored in the array inside the PayPalHttpConfig class. To make changes to those settings + * for your specific environments, feel free to add them using the code shown below + * Uncomment below line to override any default curl options. + */ +//PayPalHttpConfig::$defaultCurlOptions[CURLOPT_SSLVERSION] = CURL_SSLVERSION_TLSv1_2; + + /** @var \Paypal\Rest\ApiContext $apiContext */ $apiContext = getApiContext($clientId, $clientSecret); From d49cc8a88cf223edaaa8c49d4733c4e3d3f18efc Mon Sep 17 00:00:00 2001 From: Jay Patel Date: Wed, 20 Jan 2016 23:10:19 +0530 Subject: [PATCH 6/6] Preparing for Release 1.6.4 --- README.md | 1 + lib/PayPal/Core/PayPalConstants.php | 2 +- release_notes.md | 5 +++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 06a5f7f5..c4008984 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,7 @@ __Welcome to PayPal PHP SDK__. This repository contains PayPal's PHP SDK and sam ## Latest Updates +- If you are running into SSL Connect Error talking to sandbox or live, please update your SDK to latest version or, follow instructions as shown [here](https://github.com/paypal/PayPal-PHP-SDK/issues/474) - Checkout the latest 1.0.0 release. Here are all the [ breaking Changes in v1.0.0 ](https://github.com/paypal/PayPal-PHP-SDK/wiki/Breaking-Changes---1.0.0) if you are migrating from older versions. - Now we have a [Github Page](http://paypal.github.io/PayPal-PHP-SDK/), that helps you find all helpful resources building applications using PayPal-PHP-SDK. diff --git a/lib/PayPal/Core/PayPalConstants.php b/lib/PayPal/Core/PayPalConstants.php index 34be247e..7de52687 100644 --- a/lib/PayPal/Core/PayPalConstants.php +++ b/lib/PayPal/Core/PayPalConstants.php @@ -12,7 +12,7 @@ class PayPalConstants { const SDK_NAME = 'PayPal-PHP-SDK'; - const SDK_VERSION = '1.6.3'; + const SDK_VERSION = '1.6.4'; /** * Approval URL for Payment diff --git a/release_notes.md b/release_notes.md index fea4a364..67c026c9 100644 --- a/release_notes.md +++ b/release_notes.md @@ -1,6 +1,11 @@ PayPal PHP SDK release notes ============================ +v1.6.4 +---- +* SSL Connect Error Fix +* Fixes #474 + v1.6.3 ---- * Fixes Continue 100 Header