Updating sample comments

This commit is contained in:
aydiv
2013-08-26 12:21:29 +05:30
parent b1f1887cec
commit 05a4aef55e
18 changed files with 180 additions and 121 deletions

View File

@@ -11,13 +11,15 @@ use PayPal\Api\Amount;
use PayPal\Api\Refund;
use PayPal\Api\Sale;
// ### Refund
// Create a refund object indicating
// refund amount
// ### Refund amount
// Includes both the refunded amount (to Payer)
// and refunded fee (to Payee). Use the $amt->details
// field to mention fees refund details.
$amt = new Amount();
$amt->setCurrency('USD')
->setTotal('0.01');
// ### Refund object
$refund = new Refund();
$refund->setAmount($amt);
@@ -29,7 +31,6 @@ $saleId = '3RM92092UW5126232';
// given sale transaction id.
$sale = new Sale();
$sale->setId($saleId);
try {
// Refund the sale
// (See bootstrap.php for more on `ApiContext`)
@@ -41,6 +42,9 @@ try {
}
?>
<html>
<head>
<title>Refund a sale</title>
</head>
<body>
<div>Refunding sale id: <?php echo $saleId;?></div>
<pre><?php var_dump($sale);?></pre>