From ab334918b0cf2baf3a866464773a145bb9983e18 Mon Sep 17 00:00:00 2001
From: Jay Patel
Date: Thu, 23 Apr 2015 23:34:24 -0500
Subject: [PATCH] Sample ResultPrinter Not to be Used
- Comment everywhere the ResultPrinter is used to not use outside sample
---
.../CreateBillingAgreementWithCreditCard.php | 4 +-
.../CreateBillingAgreementWithPayPal.php | 4 +-
sample/billing/CreatePlan.php | 6 +-
sample/billing/DeletePlan.php | 6 +-
sample/billing/ExecuteAgreement.php | 9 +-
sample/billing/GetBillingAgreement.php | 4 +-
sample/billing/GetPlan.php | 6 +-
sample/billing/ListPlans.php | 6 +-
sample/billing/ReactivateBillingAgreement.php | 2 +
sample/billing/SearchBillingTransactions.php | 6 +-
sample/billing/SuspendBillingAgreement.php | 6 +-
sample/billing/UpdateBillingAgreement.php | 6 +-
sample/billing/UpdatePlan.php | 6 +-
.../billing/UpdatePlanPaymentDefinitions.php | 6 +-
sample/doc/assets/behavior.js | 150 +-----------------
.../CreateBillingAgreementWithCreditCard.html | 7 +-
.../CreateBillingAgreementWithPayPal.html | 7 +-
sample/doc/billing/CreatePlan.html | 7 +-
sample/doc/billing/DeletePlan.html | 8 +-
sample/doc/billing/ExecuteAgreement.html | 17 +-
sample/doc/billing/GetBillingAgreement.html | 7 +-
sample/doc/billing/GetPlan.html | 8 +-
sample/doc/billing/ListPlans.html | 7 +-
.../billing/ReactivateBillingAgreement.html | 7 +-
.../billing/SearchBillingTransactions.html | 7 +-
.../doc/billing/SuspendBillingAgreement.html | 7 +-
.../doc/billing/UpdateBillingAgreement.html | 7 +-
sample/doc/billing/UpdatePlan.html | 7 +-
.../billing/UpdatePlanPaymentDefinitions.html | 7 +-
sample/doc/invoice/CancelInvoice.html | 7 +-
sample/doc/invoice/CreateInvoice.html | 7 +-
sample/doc/invoice/DeleteInvoice.html | 7 +-
sample/doc/invoice/GetInvoice.html | 7 +-
sample/doc/invoice/ListInvoice.html | 6 +-
sample/doc/invoice/RecordPayment.html | 14 +-
sample/doc/invoice/RecordRefund.html | 14 +-
sample/doc/invoice/RemindInvoice.html | 14 +-
sample/doc/invoice/RetrieveQRCode.html | 7 +-
sample/doc/invoice/SearchInvoices.html | 6 +-
sample/doc/invoice/SendInvoice.html | 14 +-
sample/doc/invoice/UpdateInvoice.html | 14 +-
.../GenerateAccessTokenFromRefreshToken.html | 6 +-
sample/doc/lipp/GetUserInfo.html | 6 +-
sample/doc/lipp/ObtainUserConsent.html | 3 +-
sample/doc/lipp/UserConsentRedirect.html | 7 +-
sample/doc/notifications/CreateWebhook.html | 16 +-
.../doc/notifications/DeleteAllWebhooks.html | 7 +-
sample/doc/notifications/DeleteWebhook.html | 7 +-
sample/doc/notifications/GetWebhook.html | 7 +-
.../ListSubscribedWebhookEventTypes.html | 7 +-
sample/doc/notifications/ListWebhooks.html | 7 +-
.../notifications/SearchWebhookEvents.html | 7 +-
sample/doc/notifications/UpdateWebhook.html | 7 +-
.../notifications/WebhookEventTypesList.html | 7 +-
.../payment-experience/CreateWebProfile.html | 7 +-
.../payment-experience/DeleteWebProfile.html | 7 +-
.../doc/payment-experience/GetWebProfile.html | 8 +-
.../payment-experience/ListWebProfiles.html | 7 +-
.../PartiallyUpdateWebProfile.html | 7 +-
.../payment-experience/UpdateWebProfile.html | 7 +-
sample/doc/payments/AuthorizationCapture.html | 7 +-
sample/doc/payments/AuthorizePayment.html | 7 +-
.../payments/AuthorizePaymentUsingPayPal.html | 8 +-
sample/doc/payments/CreateFuturePayment.html | 7 +-
sample/doc/payments/CreatePayment.html | 7 +-
.../payments/CreatePaymentUsingPayPal.html | 7 +-
.../payments/CreatePaymentUsingSavedCard.html | 8 +-
sample/doc/payments/ExecutePayment.html | 17 +-
sample/doc/payments/GetAuthorization.html | 7 +-
sample/doc/payments/GetCapture.html | 7 +-
sample/doc/payments/GetPayment.html | 8 +-
sample/doc/payments/ListPayments.html | 7 +-
sample/doc/payments/OrderAuthorize.html | 9 +-
sample/doc/payments/OrderCapture.html | 9 +-
.../payments/OrderCreateForAuthorization.html | 8 +-
.../doc/payments/OrderCreateForCapture.html | 8 +-
sample/doc/payments/OrderCreateForVoid.html | 7 +-
.../doc/payments/OrderCreateUsingPayPal.html | 8 +-
sample/doc/payments/OrderDoVoid.html | 9 +-
sample/doc/payments/OrderGet.html | 9 +-
sample/doc/payments/Reauthorization.html | 7 +-
sample/doc/payments/RefundCapture.html | 7 +-
sample/doc/payments/UpdatePayment.html | 14 +-
sample/doc/payments/VoidAuthorization.html | 7 +-
sample/doc/payouts/CancelPayoutItem.html | 9 +-
sample/doc/payouts/CreateBatchPayout.html | 7 +-
sample/doc/payouts/CreateSinglePayout.html | 7 +-
sample/doc/payouts/GetPayoutBatchStatus.html | 7 +-
sample/doc/payouts/GetPayoutItemStatus.html | 7 +-
sample/doc/sale/GetSale.html | 8 +-
sample/doc/sale/RefundSale.html | 7 +-
sample/doc/vault/CreateBankAccount.html | 7 +-
sample/doc/vault/CreateCreditCard.html | 7 +-
sample/doc/vault/DeleteBankAccount.html | 7 +-
sample/doc/vault/DeleteCreditCard.html | 7 +-
sample/doc/vault/GetBankAccount.html | 7 +-
sample/doc/vault/GetCreditCard.html | 7 +-
sample/doc/vault/UpdateCreditCard.html | 7 +-
sample/invoice/CancelInvoice.php | 6 +-
sample/invoice/CreateInvoice.php | 6 +-
sample/invoice/DeleteInvoice.php | 6 +-
sample/invoice/GetInvoice.php | 6 +-
sample/invoice/ListInvoice.php | 6 +-
sample/invoice/RecordPayment.php | 12 +-
sample/invoice/RecordRefund.php | 12 +-
sample/invoice/RemindInvoice.php | 12 +-
sample/invoice/RetrieveQRCode.php | 6 +-
sample/invoice/SearchInvoices.php | 6 +-
sample/invoice/SendInvoice.php | 12 +-
sample/invoice/UpdateInvoice.php | 12 +-
.../GenerateAccessTokenFromRefreshToken.php | 6 +-
sample/lipp/GetUserInfo.php | 6 +-
sample/lipp/ObtainUserConsent.php | 3 +-
sample/lipp/UserConsentRedirect.php | 6 +-
sample/notifications/CreateWebhook.php | 9 +-
sample/notifications/DeleteAllWebhooks.php | 6 +-
sample/notifications/DeleteWebhook.php | 6 +-
sample/notifications/GetWebhook.php | 6 +-
.../ListSubscribedWebhookEventTypes.php | 6 +-
sample/notifications/ListWebhooks.php | 6 +-
sample/notifications/SearchWebhookEvents.php | 6 +-
sample/notifications/UpdateWebhook.php | 6 +-
.../notifications/WebhookEventTypesList.php | 6 +-
.../payment-experience/CreateWebProfile.php | 6 +-
.../payment-experience/DeleteWebProfile.php | 6 +-
sample/payment-experience/GetWebProfile.php | 6 +-
sample/payment-experience/ListWebProfiles.php | 6 +-
.../PartiallyUpdateWebProfile.php | 6 +-
.../payment-experience/UpdateWebProfile.php | 6 +-
sample/payments/AuthorizationCapture.php | 6 +-
sample/payments/AuthorizePayment.php | 6 +-
.../payments/AuthorizePaymentUsingPayPal.php | 6 +-
sample/payments/CreateFuturePayment.php | 6 +-
sample/payments/CreatePayment.php | 6 +-
sample/payments/CreatePaymentUsingPayPal.php | 6 +-
.../payments/CreatePaymentUsingSavedCard.php | 6 +-
sample/payments/ExecutePayment.php | 9 +-
sample/payments/GetAuthorization.php | 6 +-
sample/payments/GetCapture.php | 6 +-
sample/payments/GetPayment.php | 6 +-
sample/payments/ListPayments.php | 6 +-
sample/payments/OrderAuthorize.php | 5 +-
sample/payments/OrderCapture.php | 5 +-
.../payments/OrderCreateForAuthorization.php | 6 +-
sample/payments/OrderCreateForCapture.php | 6 +-
sample/payments/OrderCreateForVoid.php | 6 +-
sample/payments/OrderCreateUsingPayPal.php | 6 +-
sample/payments/OrderDoVoid.php | 7 +-
sample/payments/OrderGet.php | 5 +-
sample/payments/Reauthorization.php | 4 +-
sample/payments/RefundCapture.php | 6 +-
sample/payments/UpdatePayment.php | 12 +-
sample/payments/VoidAuthorization.php | 6 +-
sample/payouts/CancelPayoutItem.php | 7 +-
sample/payouts/CreateBatchPayout.php | 6 +-
sample/payouts/CreateSinglePayout.php | 6 +-
sample/payouts/GetPayoutBatchStatus.php | 6 +-
sample/payouts/GetPayoutItemStatus.php | 6 +-
sample/sale/GetSale.php | 6 +-
sample/sale/RefundSale.php | 6 +-
sample/vault/CreateBankAccount.php | 6 +-
sample/vault/CreateCreditCard.php | 6 +-
sample/vault/DeleteBankAccount.php | 6 +-
sample/vault/DeleteCreditCard.php | 6 +-
sample/vault/GetBankAccount.php | 6 +-
sample/vault/GetCreditCard.php | 6 +-
sample/vault/UpdateCreditCard.php | 6 +-
167 files changed, 592 insertions(+), 749 deletions(-)
diff --git a/sample/billing/CreateBillingAgreementWithCreditCard.php b/sample/billing/CreateBillingAgreementWithCreditCard.php
index b4146cd..022a50b 100644
--- a/sample/billing/CreateBillingAgreementWithCreditCard.php
+++ b/sample/billing/CreateBillingAgreementWithCreditCard.php
@@ -101,10 +101,12 @@ try {
$agreement = $agreement->create($apiContext);
} catch (Exception $ex) {
+ // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY
ResultPrinter::printError("Created Billing Agreement.", "Agreement", $agreement->getId(), $request, $ex);
exit(1);
}
-ResultPrinter::printResult("Created Billing Agreement.", "Agreement", $agreement->getId(), $request, $agreement);
+ // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY
+ ResultPrinter::printResult("Created Billing Agreement.", "Agreement", $agreement->getId(), $request, $agreement);
return $agreement;
diff --git a/sample/billing/CreateBillingAgreementWithPayPal.php b/sample/billing/CreateBillingAgreementWithPayPal.php
index 3770f55..046f302 100644
--- a/sample/billing/CreateBillingAgreementWithPayPal.php
+++ b/sample/billing/CreateBillingAgreementWithPayPal.php
@@ -76,10 +76,12 @@ try {
$approvalUrl = $agreement->getApprovalLink();
} catch (Exception $ex) {
+ // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY
ResultPrinter::printError("Created Billing Agreement.", "Agreement", null, $request, $ex);
exit(1);
}
-ResultPrinter::printResult("Created Billing Agreement. Please visit the URL to Approve.", "Agreement", "$approvalUrl", $request, $agreement);
+// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY
+ ResultPrinter::printResult("Created Billing Agreement. Please visit the URL to Approve.", "Agreement", "$approvalUrl", $request, $agreement);
return $agreement;
diff --git a/sample/billing/CreatePlan.php b/sample/billing/CreatePlan.php
index 60f4fbb..03e9105 100644
--- a/sample/billing/CreatePlan.php
+++ b/sample/billing/CreatePlan.php
@@ -65,10 +65,12 @@ $request = clone $plan;
try {
$output = $plan->create($apiContext);
} catch (Exception $ex) {
- ResultPrinter::printError("Created Plan", "Plan", null, $request, $ex);
+ // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY
+ ResultPrinter::printError("Created Plan", "Plan", null, $request, $ex);
exit(1);
}
-ResultPrinter::printResult("Created Plan", "Plan", $output->getId(), $request, $output);
+// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY
+ ResultPrinter::printResult("Created Plan", "Plan", $output->getId(), $request, $output);
return $output;
diff --git a/sample/billing/DeletePlan.php b/sample/billing/DeletePlan.php
index 9a150f5..c86e3b3 100644
--- a/sample/billing/DeletePlan.php
+++ b/sample/billing/DeletePlan.php
@@ -15,10 +15,12 @@ use PayPal\Api\Plan;
try {
$result = $createdPlan->delete($apiContext);
} catch (Exception $ex) {
- ResultPrinter::printError("Deleted a Plan", "Plan", $createdPlan->getId(), null, $ex);
+ // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY
+ ResultPrinter::printError("Deleted a Plan", "Plan", $createdPlan->getId(), null, $ex);
exit(1);
}
-ResultPrinter::printResult("Deleted a Plan", "Plan", $createdPlan->getId(), null, null);
+// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY
+ ResultPrinter::printResult("Deleted a Plan", "Plan", $createdPlan->getId(), null, null);
return $createdPlan;
diff --git a/sample/billing/ExecuteAgreement.php b/sample/billing/ExecuteAgreement.php
index e02a688..35e17ea 100644
--- a/sample/billing/ExecuteAgreement.php
+++ b/sample/billing/ExecuteAgreement.php
@@ -16,10 +16,12 @@ if (isset($_GET['success']) && $_GET['success'] == 'true') {
// Execute the agreement by passing in the token
$agreement->execute($token, $apiContext);
} catch (Exception $ex) {
- ResultPrinter::printError("Executed an Agreement", "Agreement", $agreement->getId(), $_GET['token'], $ex);
+ // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY
+ ResultPrinter::printError("Executed an Agreement", "Agreement", $agreement->getId(), $_GET['token'], $ex);
exit(1);
}
+ // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY
ResultPrinter::printResult("Executed an Agreement", "Agreement", $agreement->getId(), $_GET['token'], $agreement);
// ## Get Agreement
@@ -27,12 +29,15 @@ if (isset($_GET['success']) && $_GET['success'] == 'true') {
try {
$agreement = \PayPal\Api\Agreement::get($agreement->getId(), $apiContext);
} catch (Exception $ex) {
- ResultPrinter::printError("Get Agreement", "Agreement", null, null, $ex);
+ // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY
+ ResultPrinter::printError("Get Agreement", "Agreement", null, null, $ex);
exit(1);
}
+ // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY
ResultPrinter::printResult("Get Agreement", "Agreement", $agreement->getId(), null, $agreement);
} else {
+ // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY
ResultPrinter::printResult("User Cancelled the Approval", null);
}
diff --git a/sample/billing/GetBillingAgreement.php b/sample/billing/GetBillingAgreement.php
index f62ef15..c1d347d 100644
--- a/sample/billing/GetBillingAgreement.php
+++ b/sample/billing/GetBillingAgreement.php
@@ -15,10 +15,12 @@ use PayPal\Api\Agreement;
try {
$agreement = Agreement::get($createdAgreement->getId(), $apiContext);
} catch (Exception $ex) {
- ResultPrinter::printError("Retrieved an Agreement", "Agreement", $agreement->getId(), $createdAgreement->getId(), $ex);
+ // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY
+ ResultPrinter::printError("Retrieved an Agreement", "Agreement", $agreement->getId(), $createdAgreement->getId(), $ex);
exit(1);
}
+// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY
ResultPrinter::printResult("Retrieved an Agreement", "Agreement", $agreement->getId(), $createdAgreement->getId(), $agreement);
return $agreement;
diff --git a/sample/billing/GetPlan.php b/sample/billing/GetPlan.php
index 3395461..054e48e 100644
--- a/sample/billing/GetPlan.php
+++ b/sample/billing/GetPlan.php
@@ -15,10 +15,12 @@ use PayPal\Api\Plan;
try {
$plan = Plan::get($createdPlan->getId(), $apiContext);
} catch (Exception $ex) {
- ResultPrinter::printError("Retrieved a Plan", "Plan", $plan->getId(), null, $ex);
+ // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY
+ ResultPrinter::printError("Retrieved a Plan", "Plan", $plan->getId(), null, $ex);
exit(1);
}
-ResultPrinter::printResult("Retrieved a Plan", "Plan", $plan->getId(), null, $plan);
+// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY
+ ResultPrinter::printResult("Retrieved a Plan", "Plan", $plan->getId(), null, $plan);
return $plan;
diff --git a/sample/billing/ListPlans.php b/sample/billing/ListPlans.php
index 83d8c75..f56746d 100644
--- a/sample/billing/ListPlans.php
+++ b/sample/billing/ListPlans.php
@@ -20,10 +20,12 @@ try {
$params = array('page_size' => '2');
$planList = Plan::all($params, $apiContext);
} catch (Exception $ex) {
- ResultPrinter::printError("List of Plans", "Plan", null, $params, $ex);
+ // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY
+ ResultPrinter::printError("List of Plans", "Plan", null, $params, $ex);
exit(1);
}
-ResultPrinter::printResult("List of Plans", "Plan", null, $params, $planList);
+// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY
+ ResultPrinter::printResult("List of Plans", "Plan", null, $params, $planList);
return $planList;
diff --git a/sample/billing/ReactivateBillingAgreement.php b/sample/billing/ReactivateBillingAgreement.php
index a5c511d..b82e1ef 100644
--- a/sample/billing/ReactivateBillingAgreement.php
+++ b/sample/billing/ReactivateBillingAgreement.php
@@ -25,10 +25,12 @@ try {
$agreement = Agreement::get($suspendedAgreement->getId(), $apiContext);
} catch (Exception $ex) {
+ // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY
ResultPrinter::printResult("Reactivate the Agreement", "Agreement", $agreement->getId(), $suspendedAgreement, $ex);
exit(1);
}
+// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY
ResultPrinter::printResult("Reactivate the Agreement", "Agreement", $agreement->getId(), $suspendedAgreement, $agreement);
return $agreement;
diff --git a/sample/billing/SearchBillingTransactions.php b/sample/billing/SearchBillingTransactions.php
index 85c7d19..5713b52 100644
--- a/sample/billing/SearchBillingTransactions.php
+++ b/sample/billing/SearchBillingTransactions.php
@@ -21,10 +21,12 @@ $params = array('start_date' => date('Y-m-d', strtotime('-15 years')), 'end_date
try {
$result = Agreement::searchTransactions($agreementId, $params, $apiContext);
} catch (Exception $ex) {
- ResultPrinter::printError("Search for Transactions", "AgreementTransaction", $agreementId, null, $ex);
+ // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY
+ ResultPrinter::printError("Search for Transactions", "AgreementTransaction", $agreementId, null, $ex);
exit(1);
}
-ResultPrinter::printResult("Search for Transactions", "AgreementTransaction", $agreementId, $params, $result);
+// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY
+ ResultPrinter::printResult("Search for Transactions", "AgreementTransaction", $agreementId, $params, $result);
return $agreement;
diff --git a/sample/billing/SuspendBillingAgreement.php b/sample/billing/SuspendBillingAgreement.php
index 3d5cef0..fb12581 100644
--- a/sample/billing/SuspendBillingAgreement.php
+++ b/sample/billing/SuspendBillingAgreement.php
@@ -25,10 +25,12 @@ try {
$agreement = Agreement::get($createdAgreement->getId(), $apiContext);
} catch (Exception $ex) {
- ResultPrinter::printError("Suspended the Agreement", "Agreement", null, $agreementStateDescriptor, $ex);
+ // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY
+ ResultPrinter::printError("Suspended the Agreement", "Agreement", null, $agreementStateDescriptor, $ex);
exit(1);
}
-ResultPrinter::printResult("Suspended the Agreement", "Agreement", $agreement->getId(), $agreementStateDescriptor, $agreement);
+// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY
+ ResultPrinter::printResult("Suspended the Agreement", "Agreement", $agreement->getId(), $agreementStateDescriptor, $agreement);
return $agreement;
diff --git a/sample/billing/UpdateBillingAgreement.php b/sample/billing/UpdateBillingAgreement.php
index bc8144d..e79c026 100644
--- a/sample/billing/UpdateBillingAgreement.php
+++ b/sample/billing/UpdateBillingAgreement.php
@@ -37,10 +37,12 @@ try {
$agreement = Agreement::get($createdAgreement->getId(), $apiContext);
} catch (Exception $ex) {
- ResultPrinter::printError("Updated the Agreement with new Description and Updated Shipping Address", "Agreement", null, $patchRequest, $ex);
+ // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY
+ ResultPrinter::printError("Updated the Agreement with new Description and Updated Shipping Address", "Agreement", null, $patchRequest, $ex);
exit(1);
}
-ResultPrinter::printResult("Updated the Agreement with new Description and Updated Shipping Address", "Agreement", $agreement->getId(), $patchRequest, $agreement);
+// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY
+ ResultPrinter::printResult("Updated the Agreement with new Description and Updated Shipping Address", "Agreement", $agreement->getId(), $patchRequest, $agreement);
return $agreement;
diff --git a/sample/billing/UpdatePlan.php b/sample/billing/UpdatePlan.php
index 96e2692..bbdfae2 100644
--- a/sample/billing/UpdatePlan.php
+++ b/sample/billing/UpdatePlan.php
@@ -35,10 +35,12 @@ try {
$plan = Plan::get($createdPlan->getId(), $apiContext);
} catch (Exception $ex) {
- ResultPrinter::printError("Updated the Plan to Active State", "Plan", null, $patchRequest, $ex);
+ // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY
+ ResultPrinter::printError("Updated the Plan to Active State", "Plan", null, $patchRequest, $ex);
exit(1);
}
-ResultPrinter::printResult("Updated the Plan to Active State", "Plan", $plan->getId(), $patchRequest, $plan);
+// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY
+ ResultPrinter::printResult("Updated the Plan to Active State", "Plan", $plan->getId(), $patchRequest, $plan);
return $plan;
diff --git a/sample/billing/UpdatePlanPaymentDefinitions.php b/sample/billing/UpdatePlanPaymentDefinitions.php
index 912b95e..e58a0f0 100644
--- a/sample/billing/UpdatePlanPaymentDefinitions.php
+++ b/sample/billing/UpdatePlanPaymentDefinitions.php
@@ -42,10 +42,12 @@ try {
$plan = Plan::get($createdPlan->getId(), $apiContext);
} catch (Exception $ex) {
- ResultPrinter::printError("Updated the Plan Payment Definition", "Plan", null, $patchRequest, $ex);
+ // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY
+ ResultPrinter::printError("Updated the Plan Payment Definition", "Plan", null, $patchRequest, $ex);
exit(1);
}
-ResultPrinter::printResult("Updated the Plan Payment Definition", "Plan", $plan->getId(), $patchRequest, $plan);
+// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY
+ ResultPrinter::printResult("Updated the Plan Payment Definition", "Plan", $plan->getId(), $patchRequest, $plan);
return $plan;
diff --git a/sample/doc/assets/behavior.js b/sample/doc/assets/behavior.js
index 816a63f..a8c411d 100644
--- a/sample/doc/assets/behavior.js
+++ b/sample/doc/assets/behavior.js
@@ -310,104 +310,7 @@ f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3
"pageTitle": "invoice/CreateInvoice",
"title": "CreateInvoice"
},
- "depth": 2,
- "outline": [
- {
- "type": "heading",
- "data": {
- "level": 1,
- "title": "Create Invoice Sample",
- "slug": "create-invoice-sample"
- },
- "depth": 1,
- "children": [
- {
- "type": "heading",
- "data": {
- "level": 3,
- "title": "Invoice Info",
- "slug": "invoice-info"
- },
- "depth": 3
- }, {
- "type": "heading",
- "data": {
- "level": 3,
- "title": "Merchant Info",
- "slug": "merchant-info"
- },
- "depth": 3
- }, {
- "type": "heading",
- "data": {
- "level": 3,
- "title": "Address Information",
- "slug": "address-information"
- },
- "depth": 3
- }, {
- "type": "heading",
- "data": {
- "level": 3,
- "title": "Billing Information",
- "slug": "billing-information"
- },
- "depth": 3
- }, {
- "type": "heading",
- "data": {
- "level": 3,
- "title": "Items List",
- "slug": "items-list"
- },
- "depth": 3,
- "children": [
- {
- "type": "heading",
- "data": {
- "level": 4,
- "title": "Tax Item",
- "slug": "tax-item"
- },
- "depth": 4
- }, {
- "type": "heading",
- "data": {
- "level": 4,
- "title": "Tax Item",
- "slug": "tax-item"
- },
- "depth": 4
- }
- ]
- }, {
- "type": "heading",
- "data": {
- "level": 3,
- "title": "Shipping Information",
- "slug": "shipping-information"
- },
- "depth": 3
- }, {
- "type": "heading",
- "data": {
- "level": 3,
- "title": "Logo",
- "slug": "logo"
- },
- "depth": 3
- }, {
- "type": "heading",
- "data": {
- "level": 3,
- "title": "Create Invoice",
- "slug": "create-invoice"
- },
- "depth": 3
- }
- ]
- }
- ]
+ "depth": 2
}, {
"type": "file",
"data": {
@@ -697,56 +600,7 @@ f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3
"pageTitle": "notifications/CreateWebhook",
"title": "CreateWebhook"
},
- "depth": 2,
- "outline": [
- {
- "type": "heading",
- "data": {
- "level": 1,
- "title": "Create Webhook Sample",
- "slug": "create-webhook-sample"
- },
- "depth": 1
- }, {
- "type": "heading",
- "data": {
- "level": 1,
- "title": "Basic Information",
- "slug": "basic-information"
- },
- "depth": 1,
- "children": [
- {
- "type": "heading",
- "data": {
- "level": 4,
- "title": "NOTE: Please note that you need an https url for paypal webhooks. You can however override the url with https, and accept",
- "slug": "note-please-note-that-you-need-an-https-url-for-paypal-webhooks-you-can-however-override-the-url-with-https-and-accept"
- },
- "depth": 4
- }
- ]
- }, {
- "type": "heading",
- "data": {
- "level": 1,
- "title": "Event Types",
- "slug": "event-types"
- },
- "depth": 1,
- "children": [
- {
- "type": "heading",
- "data": {
- "level": 3,
- "title": "Create Webhook",
- "slug": "create-webhook"
- },
- "depth": 3
- }
- ]
- }
- ]
+ "depth": 2
}, {
"type": "file",
"data": {
diff --git a/sample/doc/billing/CreateBillingAgreementWithCreditCard.html b/sample/doc/billing/CreateBillingAgreementWithCreditCard.html
index aab9861..f5fb6f4 100644
--- a/sample/doc/billing/CreateBillingAgreementWithCreditCard.html
+++ b/sample/doc/billing/CreateBillingAgreementWithCreditCard.html
@@ -74,11 +74,8 @@ Please note that the plan Id should be only set in this case.
'US');
$agreement->setShippingAddress($shippingAddress);$request = clone $agreement;
$agreement = $agreement->create($apiContext);
-} catch (Exception $ex) {
- ResultPrinter::printError("Created Billing Agreement.", "Agreement", $agreement->getId(), $request, $ex);
+} catch (Exception $ex) {
ResultPrinter::printError("Created Billing Agreement.", "Agreement", $agreement->getId(), $request, $ex);
exit(1);
-}
-
-ResultPrinter::printResult("Created Billing Agreement.", "Agreement", $agreement->getId(), $request, $agreement);
+}
ResultPrinter::printResult("Created Billing Agreement.", "Agreement", $agreement->getId(), $request, $agreement);
return $agreement;
For Sample Purposes Only.