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.
Please note that as the agreement has not yet activated, we wont be receiving the ID just yet.
NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY
NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY
For Sample Purposes Only.