diff --git a/README.md b/README.md index 2142945..36e49a1 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ If you do not want to use composer, you can grab the SDK zip that contains Paypa ## Samples ### View - * Using the [htmlpreview](https://github.com/htmlpreview/htmlpreview.github.com) tool you can now [view sample source codes here](http://htmlpreview.github.io/?https://github.com/paypal/PayPal-PHP-SDK/blob/master/sample/index.html) + * Using the [htmlpreview](https://github.com/htmlpreview/htmlpreview.github.com) tool you can now [view sample source codes here](http://htmlpreview.github.io/?https://github.com/paypal/PayPal-PHP-SDK/blob/master/sample/index.php) ### Running Locally diff --git a/sample/index.php b/sample/index.php index 671797b..5bbc2de 100644 --- a/sample/index.php +++ b/sample/index.php @@ -10,875 +10,907 @@ if (PHP_SAPI == 'cli') { 1 => STDOUT, 2 => STDERR, ); - $proc = proc_open($cmd, $descriptors, $pipes); - if ($proc === false) { + $process = proc_open($cmd, $descriptors, $pipes); + if ($process === false) { fprintf(STDERR, "Unable to launch PHP's built-in web server.\n"); exit(2); } - fclose($pipes[0]); // Close the process' stdin. - $exitCode = proc_close($proc); // Wait for process to exit. - exit($exitCode); + fclose($pipes[0]); + $exit = proc_close($process); + exit($exit); + } else { + echo "You must be running PHP version less than 5.4. You would have to manually host the website on your local web server.\n"; + exit(2); } -} else { - ?> - - -
- - - - - - +} ?> + + + + + + + + + -
- These examples are created to experiment with the PayPal-PHP-SDK capabilities. Each examples - are - designed to demonstrate the default use-cases in each segment. - Many examples should be executable, and should allow you to experience the default behavior - of our - sdk, to expedite your integration experience.
+ .footer-div a { + color: #EEE; + text-decoration: none; + } - -
+ These examples are created to experiment with the PayPal-PHP-SDK capabilities. Each examples + are + designed to demonstrate the default use-cases in each segment. + Many examples should be executable, and should allow you to experience the default behavior + of our + sdk, to expedite your integration experience.
+ -