forked from LiveCarta/PayPal-PHP-SDK
Backward Compatible Changes
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user