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 { - ?> - - - - - - - - - +} ?> + + + + + + + + + - PayPal REST API Samples + PayPal REST API Samples - - - - - - + #leftNavigation { + visibility: hidden; + } + } - - -
-
-
-
- -
-
-

REST API Samples

+ @media (min-width: 992px) { + .jumbotron { + background: -webkit-linear-gradient(-9deg, white 30%, #428bca 25%); + color: #EEE; + } -

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; + } - -
-
-
-
+ html { + position: relative; + min-height: 100%; + } + + body { + /* Margin bottom by footer height */ + margin-bottom: 60px; + } + + .footer { + position: absolute; + bottom: 0; + width: 100%; + min-height: 60px; + background: -webkit-linear-gradient(-9deg, #428bca 70%, white 25%); + } + + .footer-links, .footer-links li { + display: inline-block; + font-size: 110%; + padding-left: 0px; + padding-right: 0px; + } + + .footer-links li { + padding-top: 5px; + padding-left: 5px; + } + + .fixed { + position: fixed; + } + + .nav a { + font-weight: bold; + } + + + + + + + + +
-
-
 
-
-
-
-

Payments

-
- - -
+

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.

+ - -
-
-

Sale

-
- - -
- -
- - - -
- -
-
-

Vault

-
- - -
- -
- - - -
- -
-
-

Invoice

-
- - -
- -
- - - -
-
-
-
- - - - - - - +
+ +
+
+
+ +
+
+
+
+

Payments

+
+ + +
+ +
+ + + +
+ +
+
+

Sale

+
+ + +
+ +
+ + + +
+ +
+
+

Vault

+
+ + +
+ +
+ + + +
+ +
+
+

Invoice

+
+ + +
+ +
+ + + +
+
+
+
+ + + + + + + + + + +