Sample ResultPrinter Not to be Used

- Comment everywhere the ResultPrinter is used to not use outside sample
This commit is contained in:
Jay Patel
2015-04-23 23:34:24 -05:00
parent c1dbda1242
commit ab334918b0
167 changed files with 592 additions and 749 deletions

View File

@@ -83,16 +83,19 @@ try {
$result = $createdPayment->update($patchRequest, $apiContext);
} catch (Exception $ex) {
ResultPrinter::printError("Update Payment", "PatchRequest", null, $patchRequest, $ex);
// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY
ResultPrinter::printError("Update Payment", "PatchRequest", null, $patchRequest, $ex);
exit(1);
}
ResultPrinter::printResult("Update Payment", "PatchRequest", $payment->getId(), $patchRequest, null);
// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY
ResultPrinter::printResult("Update Payment", "PatchRequest", $payment->getId(), $patchRequest, null);
// ### Getting Updated Payment Object
if ($result == true) {
$result = Payment::get($createdPayment->getId(), $apiContext);
ResultPrinter::printResult("Get Payment", "Payment", $result->getId(), null, $result);
// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY
ResultPrinter::printResult("Get Payment", "Payment", $result->getId(), null, $result);
// ### Get redirect url
@@ -106,7 +109,8 @@ foreach ($result->getLinks() as $link) {
}
}
ResultPrinter::printResult("Created Payment Using PayPal. Please visit the URL to Approve.", "Payment", "<a href='$approvalUrl' >$approvalUrl</a>", $request, $result);
// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY
ResultPrinter::printResult("Created Payment Using PayPal. Please visit the URL to Approve.", "Payment", "<a href='$approvalUrl' >$approvalUrl</a>", $request, $result);
}
return $result;