From b5809666b46be259789833c354266a0e93fd2522 Mon Sep 17 00:00:00 2001 From: japatel Date: Wed, 19 Nov 2014 23:07:48 -0600 Subject: [PATCH] Updated Sample Home Page --- README.md | 2 +- sample/index.php | 1684 +++++++++++++++++++++++----------------------- 2 files changed, 859 insertions(+), 827 deletions(-) diff --git a/README.md b/README.md index 21429452..36e49a13 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 671797b8..5bbc2def 100644 --- a/sample/index.php +++ b/sample/index.php @@ -10,875 +10,907 @@ 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 - - - - + + + - - - - - - - -
-
-
-
- -
-
-

REST API Samples

- -

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.

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

REST API Samples

+ +

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.

+ +
-
-
-
 
-
-
-
-

Payments

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

Sale

-
- - +
+
+

Sale

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

Vault

-
- - +
+
+

Vault

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

Invoice

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