forked from LiveCarta/PayPal-PHP-SDK
Backward Compatible Changes
This commit is contained in:
@@ -1,34 +1,34 @@
|
||||
<?php
|
||||
|
||||
// # Get Sale sample
|
||||
// Sale transactions are nothing but completed payments.
|
||||
// This sample code demonstrates how you can retrieve
|
||||
// details of completed Sale Transaction.
|
||||
// API used: /v1/payments/sale/{sale-id}
|
||||
|
||||
require __DIR__ . '/../bootstrap.php';
|
||||
use PayPal\Api\Sale;
|
||||
|
||||
$saleId = '3RM92092UW5126232';
|
||||
|
||||
try {
|
||||
// ### Retrieve the sale object
|
||||
// Pass the ID of the sale
|
||||
// transaction from your payment resource.
|
||||
$sale = Sale::get($saleId, $apiContext);
|
||||
} catch (PayPal\Exception\PPConnectionException $ex) {
|
||||
echo "Exception:" . $ex->getMessage() . PHP_EOL;
|
||||
var_dump($ex->getData());
|
||||
exit(1);
|
||||
}
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
<title>Lookup a sale</title>
|
||||
</head>
|
||||
<body>
|
||||
<div>Retrieving sale id: <?php echo $saleId;?></div>
|
||||
<pre><?php echo $sale->toJSON(JSON_PRETTY_PRINT)?></pre>
|
||||
<a href='../index.html'>Back</a>
|
||||
</body>
|
||||
</html>
|
||||
<?php
|
||||
|
||||
// # Get Sale sample
|
||||
// Sale transactions are nothing but completed payments.
|
||||
// This sample code demonstrates how you can retrieve
|
||||
// details of completed Sale Transaction.
|
||||
// API used: /v1/payments/sale/{sale-id}
|
||||
|
||||
require __DIR__ . '/../bootstrap.php';
|
||||
use PayPal\Api\Sale;
|
||||
|
||||
$saleId = '3RM92092UW5126232';
|
||||
|
||||
try {
|
||||
// ### Retrieve the sale object
|
||||
// Pass the ID of the sale
|
||||
// transaction from your payment resource.
|
||||
$sale = Sale::get($saleId, $apiContext);
|
||||
} catch (PayPal\Exception\PPConnectionException $ex) {
|
||||
echo "Exception:" . $ex->getMessage() . PHP_EOL;
|
||||
var_dump($ex->getData());
|
||||
exit(1);
|
||||
}
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
<title>Lookup a sale</title>
|
||||
</head>
|
||||
<body>
|
||||
<div>Retrieving sale id: <?php echo $saleId;?></div>
|
||||
<pre><?php echo $sale->toJSON(128)?></pre>
|
||||
<a href='../index.html'>Back</a>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user