forked from LiveCarta/PayPal-PHP-SDK
Unit Tests and Functional Tests for Invoicing
- Updated Unit Tests for PPModels used by Invoicing - Updated Functional Tests - Updated Samples for quick changes.
This commit is contained in:
@@ -21,7 +21,7 @@ on the Invoice class by passing a valid
|
||||
notification object
|
||||
(See bootstrap.php for more on <code>ApiContext</code>)</p></div></div><div class="code"><div class="wrapper"> <span class="hljs-variable">$recordStatus</span> = <span class="hljs-variable">$invoice</span>->recordPayment(<span class="hljs-variable">$record</span>, <span class="hljs-variable">$apiContext</span>);
|
||||
} <span class="hljs-keyword">catch</span> (<span class="hljs-keyword">Exception</span> <span class="hljs-variable">$ex</span>) {
|
||||
ResultPrinter::printError(<span class="hljs-string">"Payment for Invoice"</span>, <span class="hljs-string">"Invoice"</span>, <span class="hljs-keyword">null</span>, <span class="hljs-variable">$recordStatus</span>, <span class="hljs-variable">$ex</span>);
|
||||
ResultPrinter::printError(<span class="hljs-string">"Payment for Invoice"</span>, <span class="hljs-string">"Invoice"</span>, <span class="hljs-keyword">null</span>, <span class="hljs-keyword">null</span>, <span class="hljs-variable">$ex</span>);
|
||||
<span class="hljs-keyword">exit</span>(<span class="hljs-number">1</span>);
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ on the Invoice class by passing a valid
|
||||
notification object
|
||||
(See bootstrap.php for more on <code>ApiContext</code>)</p></div></div><div class="code"><div class="wrapper"> <span class="hljs-variable">$refundStatus</span> = <span class="hljs-variable">$invoice</span>->recordRefund(<span class="hljs-variable">$refund</span>, <span class="hljs-variable">$apiContext</span>);
|
||||
} <span class="hljs-keyword">catch</span> (<span class="hljs-keyword">Exception</span> <span class="hljs-variable">$ex</span>) {
|
||||
ResultPrinter::printError(<span class="hljs-string">"Refund for Invoice"</span>, <span class="hljs-string">"Invoice"</span>, <span class="hljs-keyword">null</span>, <span class="hljs-variable">$refundStatus</span>, <span class="hljs-variable">$ex</span>);
|
||||
ResultPrinter::printError(<span class="hljs-string">"Refund for Invoice"</span>, <span class="hljs-string">"Invoice"</span>, <span class="hljs-keyword">null</span>, <span class="hljs-keyword">null</span>, <span class="hljs-variable">$ex</span>);
|
||||
<span class="hljs-keyword">exit</span>(<span class="hljs-number">1</span>);
|
||||
}
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ try {
|
||||
// (See bootstrap.php for more on `ApiContext`)
|
||||
$recordStatus = $invoice->recordPayment($record, $apiContext);
|
||||
} catch (Exception $ex) {
|
||||
ResultPrinter::printError("Payment for Invoice", "Invoice", null, $recordStatus, $ex);
|
||||
ResultPrinter::printError("Payment for Invoice", "Invoice", null, null, $ex);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ try {
|
||||
// (See bootstrap.php for more on `ApiContext`)
|
||||
$refundStatus = $invoice->recordRefund($refund, $apiContext);
|
||||
} catch (Exception $ex) {
|
||||
ResultPrinter::printError("Refund for Invoice", "Invoice", null, $refundStatus, $ex);
|
||||
ResultPrinter::printError("Refund for Invoice", "Invoice", null, null, $ex);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user