Skip to content

Commit

Permalink
Merge branch 'master' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
Jay Patel committed Jan 20, 2016
2 parents 79b2cef + d49cc8a commit 06837d2
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 3 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ php:
- 5.4
- 5.5
- 5.6
- 7.0
- hhvm
matrix:
allow_failures:
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).**
Expand All @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion lib/PayPal/Core/PayPalConstants.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/PayPal/Core/PayPalHttpConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions lib/PayPal/Validation/JsonValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
5 changes: 5 additions & 0 deletions release_notes.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
8 changes: 8 additions & 0 deletions sample/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 06837d2

Please sign in to comment.