Add samples for Invoice Template API

This commit is contained in:
Jay Patel
2016-09-19 16:22:06 -05:00
parent 4f20bc4b97
commit f0feddc8f2
8 changed files with 336 additions and 117 deletions

View File

@@ -0,0 +1,18 @@
<?php
use PayPal\Api\Templates;
require 'CreateInvoiceTemplate.php';
try {
$templates = Templates::getAll(array("fields" => "all"), $apiContext);
} catch (Exception $ex) {
// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY
ResultPrinter::printError("Get all Templates", "Templates", null, null, $ex);
exit(1);
}
// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY
ResultPrinter::printResult("Get all Templates", "Templates", null, null, $templates);
return $templates;