Backward Compatible Changes

This commit is contained in:
japatel
2014-10-20 12:17:35 -05:00
parent 2fb68e8a7a
commit 6fb6508f9c
53 changed files with 203 additions and 206 deletions

View File

@@ -48,7 +48,7 @@ try {
Captured payment <?php echo $getCapture->getParentPayment(); ?>. Capture Id:
<?php echo $getCapture->getId();?>
</div>
<pre><?php echo $getCapture->toJSON(JSON_PRETTY_PRINT);?></pre>
<pre><?php echo $getCapture->toJSON(128);?></pre>
<a href='../index.html'>Back</a>
</body>
</html>

View File

@@ -96,7 +96,7 @@ try {
Created payment:
<?php echo $payment->getId();?>
</div>
<pre><?php echo $payment->toJSON(JSON_PRETTY_PRINT);?></pre>
<pre><?php echo $payment->toJSON(128);?></pre>
<a href='../index.html'>Back</a>
</body>
</html>

View File

@@ -123,7 +123,7 @@ try {
Created payment:
<?php echo $payment->getId();?>
</div>
<pre><?php echo $payment->toJSON(JSON_PRETTY_PRINT);?></pre>
<pre><?php echo $payment->toJSON(128);?></pre>
<a href='../index.html'>Back</a>
</body>
</html>

View File

@@ -111,7 +111,7 @@ try {
Created payment:
<?php echo $payment->getId();?>
</div>
<pre><?php echo $payment->toJSON(JSON_PRETTY_PRINT);?></pre>
<pre><?php echo $payment->toJSON(128);?></pre>
<a href='../index.html'>Back</a>
</body>
</html>

View File

@@ -32,7 +32,7 @@ if(isset($_GET['success']) && $_GET['success'] == 'true') {
$result = $payment->execute($execution, $apiContext);
echo "<html><body><pre>";
echo $result->toJSON(JSON_PRETTY_PRINT);
echo $result->toJSON(128);
echo "</pre><a href='../index.html'>Back</a></body></html>";
} else {

View File

@@ -37,7 +37,7 @@ try {
Retrieved Authorization:
<?php echo $authorization->getId();?>
</div>
<pre><?php echo $authorization->toJSON(JSON_PRETTY_PRINT);?></pre>
<pre><?php echo $authorization->toJSON(128);?></pre>
<a href='../index.html'>Back</a>
</body>
</html>

View File

@@ -58,7 +58,7 @@ try {
Capture Id:
<?php echo $capture->getId();?>
</div>
<pre><?php echo $capture->toJSON(JSON_PRETTY_PRINT);?></pre>
<pre><?php echo $capture->toJSON(128);?></pre>
<a href='../index.html'>Back</a>
</body>
</html>

View File

@@ -33,7 +33,7 @@ try {
</head>
<body>
<div>Retrieving Payment ID: <?php echo $paymentId;?></div>
<pre><?php echo $payment->toJSON(JSON_PRETTY_PRINT);?></pre>
<pre><?php echo $payment->toJSON(128);?></pre>
<a href='../index.html'>Back</a>
</body>
</html>

View File

@@ -1,40 +1,40 @@
<?php
// #GetPaymentList
// This sample code demonstrate how you can
// retrieve a list of all Payment resources
// you've created using the Payments API.
// Note various query parameters that you can
// use to filter, and paginate through the
// payments list.
// API used: GET /v1/payments/payments
require __DIR__ . '/../bootstrap.php';
use PayPal\Api\Payment;
// ### Retrieve payment
// Retrieve the PaymentHistory object by calling the
// static `get` method on the Payment class,
// and pass a Map object that contains
// query parameters for paginations and filtering.
// Refer the method doc for valid values for keys
// (See bootstrap.php for more on `ApiContext`)
try {
$payments = Payment::all(array('count' => 10, 'start_index' => 5), $apiContext);
} catch (PayPal\Exception\PPConnectionException $ex) {
echo "Exception:" . $ex->getMessage() . PHP_EOL;
var_dump($ex->getData());
exit(1);
}
?>
<html>
<head>
<title>Lookup payment history</title>
</head>
<body>
<div>Got <?php echo $payments->getCount(); ?> matching payments </div>
<pre><?php echo $payments->toJSON(JSON_PRETTY_PRINT);?></pre>
<a href='../index.html'>Back</a>
</body>
</html>
<?php
// #GetPaymentList
// This sample code demonstrate how you can
// retrieve a list of all Payment resources
// you've created using the Payments API.
// Note various query parameters that you can
// use to filter, and paginate through the
// payments list.
// API used: GET /v1/payments/payments
require __DIR__ . '/../bootstrap.php';
use PayPal\Api\Payment;
// ### Retrieve payment
// Retrieve the PaymentHistory object by calling the
// static `get` method on the Payment class,
// and pass a Map object that contains
// query parameters for paginations and filtering.
// Refer the method doc for valid values for keys
// (See bootstrap.php for more on `ApiContext`)
try {
$payments = Payment::all(array('count' => 10, 'start_index' => 5), $apiContext);
} catch (PayPal\Exception\PPConnectionException $ex) {
echo "Exception:" . $ex->getMessage() . PHP_EOL;
var_dump($ex->getData());
exit(1);
}
?>
<html>
<head>
<title>Lookup payment history</title>
</head>
<body>
<div>Got <?php echo $payments->getCount(); ?> matching payments </div>
<pre><?php echo $payments->toJSON(128);?></pre>
<a href='../index.html'>Back</a>
</body>
</html>

View File

@@ -44,7 +44,7 @@ try {
<?php echo $reauthorization->getId();?>
</div>
<pre>
<?php echo $reauthorization->toJSON(JSON_PRETTY_PRINT);?>
<?php echo $reauthorization->toJSON(128);?>
</pre>
<a href='../index.html'>Back</a>
</body>

View File

@@ -64,7 +64,7 @@ try {
</head>
<body>
<div>Refund Capture:</div>
<pre><?php echo $captureRefund->toJSON(JSON_PRETTY_PRINT);?></pre>
<pre><?php echo $captureRefund->toJSON(128);?></pre>
<a href='../index.html'>Back</a>
</body>
</html>

View File

@@ -37,7 +37,7 @@ try {
<div>
Voided authorization
</div>
<pre><?php echo $voidedAuth->toJSON(JSON_PRETTY_PRINT);?></pre>
<pre><?php echo $voidedAuth->toJSON(128);?></pre>
<a href='../index.html'>Back</a>
</body>
</html>