This repository has been archived on 2026-04-06. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
PayPal-PHP-SDK/sample/invoice-templates/GetAllInvoiceTemplates.php
2016-09-29 11:48:58 -05:00

19 lines
560 B
PHP

<?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;