forked from LiveCarta/PayPal-PHP-SDK
Fix links to Developer API Reference #1302
* Fix links to Developer API Reference
This commit is contained in:
committed by
GitHub
parent
4ddb1de829
commit
2f353688b4
@@ -3,8 +3,8 @@
|
|||||||
// # Create Billing Agreement with PayPal as Payment Source
|
// # Create Billing Agreement with PayPal as Payment Source
|
||||||
//
|
//
|
||||||
// This sample code demonstrate how you can create a billing agreement, as documented here at:
|
// This sample code demonstrate how you can create a billing agreement, as documented here at:
|
||||||
// https://developer.paypal.com/docs/api/#create-an-agreement
|
// https://developer.paypal.com/docs/api/payments.billing-agreements/v1/#billing-agreements_post
|
||||||
// API used: /v1/payments/billing-agreements
|
// API used: POST /v1/payments/billing-agreements
|
||||||
|
|
||||||
// Retrieving the Plan from the Create Update Sample. This would be used to
|
// Retrieving the Plan from the Create Update Sample. This would be used to
|
||||||
// define Plan information to create an agreement. Make sure the plan you are using is in active state.
|
// define Plan information to create an agreement. Make sure the plan you are using is in active state.
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
// # Create Plan Sample
|
// # Create Plan Sample
|
||||||
//
|
//
|
||||||
// This sample code demonstrate how you can create a billing plan, as documented here at:
|
// This sample code demonstrate how you can create a billing plan, as documented here at:
|
||||||
// https://developer.paypal.com/docs/api/#create-a-plan
|
// https://developer.paypal.com/docs/api/payments.billing-plans/v1/#billing-plans_post
|
||||||
// API used: /v1/payments/billing-plans
|
// API used: POST /v1/payments/billing-plans
|
||||||
|
|
||||||
require __DIR__ . '/../bootstrap.php';
|
require __DIR__ . '/../bootstrap.php';
|
||||||
use PayPal\Api\ChargeModel;
|
use PayPal\Api\ChargeModel;
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
// # Delete Plan Sample
|
// # Delete Plan Sample
|
||||||
//
|
//
|
||||||
// This sample code demonstrate how you can delete a billing plan, as documented here at:
|
// This sample code demonstrate how you can delete a billing plan, as documented here at:
|
||||||
// https://developer.paypal.com/docs/api/#retrieve-a-plan
|
// https://developer.paypal.com/docs/api/payments.billing-plans/v1/#billing-plans_patch
|
||||||
// API used: /v1/payments/billing-plans
|
// API used: PATCH /v1/payments/billing-plans/{plan_id}
|
||||||
|
|
||||||
// Retrieving the Plan object from Create Plan Sample
|
// Retrieving the Plan object from Create Plan Sample
|
||||||
/** @var Plan $createdPlan */
|
/** @var Plan $createdPlan */
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
// # Get Billing Agreement Sample
|
// # Get Billing Agreement Sample
|
||||||
//
|
//
|
||||||
// This sample code demonstrate how you can get a billing agreement, as documented here at:
|
// This sample code demonstrate how you can get a billing agreement, as documented here at:
|
||||||
// https://developer.paypal.com/docs/api/#retrieve-an-agreement
|
// https://developer.paypal.com/docs/api/payments.billing-agreements/v1/#billing-agreements_get
|
||||||
// API used: /v1/payments/billing-agreements/<Agreement-Id>
|
// API used: GET /v1/payments/billing-agreements/{agreement_id}
|
||||||
require __DIR__ . '/../bootstrap.php';
|
require __DIR__ . '/../bootstrap.php';
|
||||||
|
|
||||||
// Retrieving the Agreement object from Create Agreement From Credit Card Sample
|
// Retrieving the Agreement object from Create Agreement From Credit Card Sample
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
// # Get Plan Sample
|
// # Get Plan Sample
|
||||||
//
|
//
|
||||||
// This sample code demonstrate how you can get a billing plan, as documented here at:
|
// This sample code demonstrate how you can get a billing plan, as documented here at:
|
||||||
// https://developer.paypal.com/docs/api/#retrieve-a-plan
|
// https://developer.paypal.com/docs/api/payments.billing-plans/v1/#billing-plans_get
|
||||||
// API used: /v1/payments/billing-plans
|
// API used: GET /v1/payments/billing-plans
|
||||||
|
|
||||||
// Retrieving the Plan object from Create Plan Sample
|
// Retrieving the Plan object from Create Plan Sample
|
||||||
/** @var Plan $createdPlan */
|
/** @var Plan $createdPlan */
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
// # Get List of Plan Sample
|
// # Get List of Plan Sample
|
||||||
//
|
//
|
||||||
// This sample code demonstrate how you can get a list of billing plan, as documented here at:
|
// This sample code demonstrate how you can get a list of billing plan, as documented here at:
|
||||||
// https://developer.paypal.com/docs/api/#list-plans
|
// https://developer.paypal.com/docs/api/payments.billing-plans/v1/#billing-plans_list
|
||||||
// API used: /v1/payments/billing-plans
|
// API used: GET /v1/payments/billing-plans
|
||||||
|
|
||||||
// Retrieving the Plan object from Create Plan Sample to demonstrate the List
|
// Retrieving the Plan object from Create Plan Sample to demonstrate the List
|
||||||
/** @var Plan $createdPlan */
|
/** @var Plan $createdPlan */
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
// # Reactivate an agreement
|
// # Reactivate an agreement
|
||||||
//
|
//
|
||||||
// This sample code demonstrate how you can reactivate a billing agreement, as documented here at:
|
// This sample code demonstrate how you can reactivate a billing agreement, as documented here at:
|
||||||
// https://developer.paypal.com/docs/api/#suspend-an-agreement
|
// https://developer.paypal.com/docs/api/payments.billing-agreements/v1/#billing-agreements_re-activate
|
||||||
// API used: /v1/payments/billing-agreements/<Agreement-Id>/suspend
|
// API used: POST /v1/payments/billing-agreements/{agreement_id}/re-activate
|
||||||
|
|
||||||
// Retrieving the Agreement object from Suspend Agreement Sample to demonstrate the List
|
// Retrieving the Agreement object from Suspend Agreement Sample to demonstrate the List
|
||||||
/** @var Agreement $suspendedAgreement */
|
/** @var Agreement $suspendedAgreement */
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
// # Search Billing Transactions Sample
|
// # Search Billing Transactions Sample
|
||||||
//
|
//
|
||||||
// This sample code demonstrate how you can search all billing transactions, as documented here at:
|
// This sample code demonstrate how you can search all billing transactions, as documented here at:
|
||||||
// https://developer.paypal.com/docs/api/#search-for-transactions
|
// https://developer.paypal.com/docs/api/payments.billing-agreements/v1/#billing-agreements_transactions
|
||||||
// API used: GET /v1/payments/billing-agreements/<Agreement-Id>/transactions? start-date=yyyy-mm-dd&end-date=yyyy-mm-dd
|
// API used: GET /v1/payments/billing-agreements/{agreement_id}/transactions? start-date=yyyy-mm-dd&end-date=yyyy-mm-dd
|
||||||
|
|
||||||
// Retrieving the Agreement object from Get Billing Agreement. This may not be necessary if you are trying to search for transactions of already created Agreement.
|
// Retrieving the Agreement object from Get Billing Agreement. This may not be necessary if you are trying to search for transactions of already created Agreement.
|
||||||
/** @var Agreement $agreement */
|
/** @var Agreement $agreement */
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
// # Suspend an agreement
|
// # Suspend an agreement
|
||||||
//
|
//
|
||||||
// This sample code demonstrate how you can suspend a billing agreement, as documented here at:
|
// This sample code demonstrate how you can suspend a billing agreement, as documented here at:
|
||||||
// https://developer.paypal.com/docs/api/#suspend-an-agreement
|
// https://developer.paypal.com/docs/api/payments.billing-agreements/v1/#billing-agreements_suspend
|
||||||
// API used: /v1/payments/billing-agreements/<Agreement-Id>/suspend
|
// API used: POST /v1/payments/billing-agreements/{agreement_id}/suspend
|
||||||
|
|
||||||
// Retrieving the Agreement object from Create Agreement Sample to demonstrate the List
|
// Retrieving the Agreement object from Create Agreement Sample to demonstrate the List
|
||||||
require __DIR__ . '/../bootstrap.php';
|
require __DIR__ . '/../bootstrap.php';
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
// # Update an agreement
|
// # Update an agreement
|
||||||
//
|
//
|
||||||
// This sample code demonstrate how you can update a billing agreement, as documented here at:
|
// This sample code demonstrate how you can update a billing agreement, as documented here at:
|
||||||
// https://developer.paypal.com/docs/api/#update-an-agreement
|
// https://developer.paypal.com/docs/api/payments.billing-agreements/v1/#billing-agreements_patch
|
||||||
// API used: /v1/payments/billing-agreements/<Agreement-Id>
|
// API used: PATCH /v1/payments/billing-agreements/{agreement_id}
|
||||||
|
|
||||||
require __DIR__ . '/../bootstrap.php';
|
require __DIR__ . '/../bootstrap.php';
|
||||||
|
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
// # Update a plan
|
// # Update a plan
|
||||||
//
|
//
|
||||||
// This sample code demonstrate how you can update a billing plan, as documented here at:
|
// This sample code demonstrate how you can update a billing plan, as documented here at:
|
||||||
// https://developer.paypal.com/docs/api/#update-a-plan
|
// https://developer.paypal.com/docs/api/payments.billing-plans/v1/#billing-plans_patch
|
||||||
// API used: /v1/payments/billing-plans/<Plan-Id>
|
// API used: PATCH /v1/payments/billing-plans/{plan_id}
|
||||||
|
|
||||||
// ### Making Plan Active
|
// ### Making Plan Active
|
||||||
// This example demonstrate how you could activate the Plan.
|
// This example demonstrate how you could activate the Plan.
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
// # Update a plan
|
// # Update a plan
|
||||||
//
|
//
|
||||||
// This sample code demonstrate how you can update a billing plan, as documented here at:
|
// This sample code demonstrate how you can update a billing plan, as documented here at:
|
||||||
// https://developer.paypal.com/docs/api/#update-a-plan
|
// https://developer.paypal.com/docs/api/payments.billing-plans/v1/#billing-plans_patch
|
||||||
// API used: /v1/payments/billing-plans/<Plan-Id>
|
// API used: PATCH /v1/payments/billing-plans/{plan_id}
|
||||||
|
|
||||||
// ### Changing Plan Amount
|
// ### Changing Plan Amount
|
||||||
// This example demonstrate how you could change the plan amount
|
// This example demonstrate how you could change the plan amount
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<!DOCTYPE html><html lang="en"><head><title>billing/CreateBillingAgreementWithPayPal</title></head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"><meta name="groc-relative-root" content="../"><meta name="groc-document-path" content="billing/CreateBillingAgreementWithPayPal"><meta name="groc-project-path" content="billing/CreateBillingAgreementWithPayPal.php"><link rel="stylesheet" type="text/css" media="all" href="../assets/style.css"><script type="text/javascript" src="../assets/behavior.js"></script><body><div id="meta"><div class="file-path">billing/CreateBillingAgreementWithPayPal.php</div></div><div id="document"><div class="segment"><div class="code"><div class="wrapper"><span class="hljs-preprocessor"><?php</span></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h1 id="create-billing-agreement-with-paypal-as-payment-source">Create Billing Agreement with PayPal as Payment Source</h1>
|
<!DOCTYPE html><html lang="en"><head><title>billing/CreateBillingAgreementWithPayPal</title></head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"><meta name="groc-relative-root" content="../"><meta name="groc-document-path" content="billing/CreateBillingAgreementWithPayPal"><meta name="groc-project-path" content="billing/CreateBillingAgreementWithPayPal.php"><link rel="stylesheet" type="text/css" media="all" href="../assets/style.css"><script type="text/javascript" src="../assets/behavior.js"></script><body><div id="meta"><div class="file-path">billing/CreateBillingAgreementWithPayPal.php</div></div><div id="document"><div class="segment"><div class="code"><div class="wrapper"><span class="hljs-preprocessor"><?php</span></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h1 id="create-billing-agreement-with-paypal-as-payment-source">Create Billing Agreement with PayPal as Payment Source</h1>
|
||||||
<p>This sample code demonstrate how you can create a billing agreement, as documented here at:
|
<p>This sample code demonstrate how you can create a billing agreement, as documented here at:
|
||||||
<a href="https://developer.paypal.com/docs/api/#create-an-agreement">https://developer.paypal.com/docs/api/#create-an-agreement</a>
|
<a href="https://developer.paypal.com/docs/api/payments.billing-agreements/v1/#billing-agreements_post">https://developer.paypal.com/docs/api/payments.billing-agreements/v1/#billing-agreements_post</a>
|
||||||
API used: /v1/payments/billing-agreements</p></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><p>Retrieving the Plan from the Create Update Sample. This would be used to
|
API used: POST /v1/payments/billing-agreements</p></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><p>Retrieving the Plan from the Create Update Sample. This would be used to
|
||||||
define Plan information to create an agreement. Make sure the plan you are using is in active state.</p></div></div><div class="code"><div class="wrapper"><span class="hljs-comment">/** <span class="hljs-doctag">@var</span> Plan $createdPlan */</span>
|
define Plan information to create an agreement. Make sure the plan you are using is in active state.</p></div></div><div class="code"><div class="wrapper"><span class="hljs-comment">/** <span class="hljs-doctag">@var</span> Plan $createdPlan */</span>
|
||||||
<span class="hljs-variable">$createdPlan</span> = <span class="hljs-keyword">require</span> <span class="hljs-string">'UpdatePlan.php'</span>;
|
<span class="hljs-variable">$createdPlan</span> = <span class="hljs-keyword">require</span> <span class="hljs-string">'UpdatePlan.php'</span>;
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<!DOCTYPE html><html lang="en"><head><title>billing/CreatePlan</title></head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"><meta name="groc-relative-root" content="../"><meta name="groc-document-path" content="billing/CreatePlan"><meta name="groc-project-path" content="billing/CreatePlan.php"><link rel="stylesheet" type="text/css" media="all" href="../assets/style.css"><script type="text/javascript" src="../assets/behavior.js"></script><body><div id="meta"><div class="file-path">billing/CreatePlan.php</div></div><div id="document"><div class="segment"><div class="code"><div class="wrapper"><span class="hljs-preprocessor"><?php</span></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h1 id="create-plan-sample">Create Plan Sample</h1>
|
<!DOCTYPE html><html lang="en"><head><title>billing/CreatePlan</title></head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"><meta name="groc-relative-root" content="../"><meta name="groc-document-path" content="billing/CreatePlan"><meta name="groc-project-path" content="billing/CreatePlan.php"><link rel="stylesheet" type="text/css" media="all" href="../assets/style.css"><script type="text/javascript" src="../assets/behavior.js"></script><body><div id="meta"><div class="file-path">billing/CreatePlan.php</div></div><div id="document"><div class="segment"><div class="code"><div class="wrapper"><span class="hljs-preprocessor"><?php</span></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h1 id="create-plan-sample">Create Plan Sample</h1>
|
||||||
<p>This sample code demonstrate how you can create a billing plan, as documented here at:
|
<p>This sample code demonstrate how you can create a billing plan, as documented here at:
|
||||||
<a href="https://developer.paypal.com/docs/api/#create-a-plan">https://developer.paypal.com/docs/api/#create-a-plan</a>
|
<a href="https://developer.paypal.com/docs/api/payments.billing-plans/v1/#billing-plans_post">https://developer.paypal.com/docs/api/payments.billing-plans/v1/#billing-plans_post</a>
|
||||||
API used: /v1/payments/billing-plans</p></div></div><div class="code"><div class="wrapper"><span class="hljs-keyword">require</span> <span class="hljs-keyword">__DIR__</span> . <span class="hljs-string">'/../bootstrap.php'</span>;
|
API used: POST /v1/payments/billing-plans</p></div></div><div class="code"><div class="wrapper"><span class="hljs-keyword">require</span> <span class="hljs-keyword">__DIR__</span> . <span class="hljs-string">'/../bootstrap.php'</span>;
|
||||||
<span class="hljs-keyword">use</span> <span class="hljs-title">PayPal</span>\<span class="hljs-title">Api</span>\<span class="hljs-title">ChargeModel</span>;
|
<span class="hljs-keyword">use</span> <span class="hljs-title">PayPal</span>\<span class="hljs-title">Api</span>\<span class="hljs-title">ChargeModel</span>;
|
||||||
<span class="hljs-keyword">use</span> <span class="hljs-title">PayPal</span>\<span class="hljs-title">Api</span>\<span class="hljs-title">Currency</span>;
|
<span class="hljs-keyword">use</span> <span class="hljs-title">PayPal</span>\<span class="hljs-title">Api</span>\<span class="hljs-title">Currency</span>;
|
||||||
<span class="hljs-keyword">use</span> <span class="hljs-title">PayPal</span>\<span class="hljs-title">Api</span>\<span class="hljs-title">MerchantPreferences</span>;
|
<span class="hljs-keyword">use</span> <span class="hljs-title">PayPal</span>\<span class="hljs-title">Api</span>\<span class="hljs-title">MerchantPreferences</span>;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<!DOCTYPE html><html lang="en"><head><title>billing/DeletePlan</title></head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"><meta name="groc-relative-root" content="../"><meta name="groc-document-path" content="billing/DeletePlan"><meta name="groc-project-path" content="billing/DeletePlan.php"><link rel="stylesheet" type="text/css" media="all" href="../assets/style.css"><script type="text/javascript" src="../assets/behavior.js"></script><body><div id="meta"><div class="file-path">billing/DeletePlan.php</div></div><div id="document"><div class="segment"><div class="code"><div class="wrapper"><span class="hljs-preprocessor"><?php</span></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h1 id="delete-plan-sample">Delete Plan Sample</h1>
|
<!DOCTYPE html><html lang="en"><head><title>billing/DeletePlan</title></head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"><meta name="groc-relative-root" content="../"><meta name="groc-document-path" content="billing/DeletePlan"><meta name="groc-project-path" content="billing/DeletePlan.php"><link rel="stylesheet" type="text/css" media="all" href="../assets/style.css"><script type="text/javascript" src="../assets/behavior.js"></script><body><div id="meta"><div class="file-path">billing/DeletePlan.php</div></div><div id="document"><div class="segment"><div class="code"><div class="wrapper"><span class="hljs-preprocessor"><?php</span></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h1 id="delete-plan-sample">Delete Plan Sample</h1>
|
||||||
<p>This sample code demonstrate how you can delete a billing plan, as documented here at:
|
<p>This sample code demonstrate how you can delete a billing plan, as documented here at:
|
||||||
<a href="https://developer.paypal.com/docs/api/#retrieve-a-plan">https://developer.paypal.com/docs/api/#retrieve-a-plan</a>
|
<a href="https://developer.paypal.com/docs/api/payments.billing-plans/v1/#billing-plans_patch">https://developer.paypal.com/docs/api/payments.billing-plans/v1/#billing-plans_patch</a>
|
||||||
API used: /v1/payments/billing-plans</p></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><p>Retrieving the Plan object from Create Plan Sample</p></div></div><div class="code"><div class="wrapper"><span class="hljs-comment">/** <span class="hljs-doctag">@var</span> Plan $createdPlan */</span>
|
API used: PATCH /v1/payments/billing-plans/{plan_id}</p></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><p>Retrieving the Plan object from Create Plan Sample</p></div></div><div class="code"><div class="wrapper"><span class="hljs-comment">/** <span class="hljs-doctag">@var</span> Plan $createdPlan */</span>
|
||||||
<span class="hljs-variable">$createdPlan</span> = <span class="hljs-keyword">require</span> <span class="hljs-string">'CreatePlan.php'</span>;
|
<span class="hljs-variable">$createdPlan</span> = <span class="hljs-keyword">require</span> <span class="hljs-string">'CreatePlan.php'</span>;
|
||||||
|
|
||||||
<span class="hljs-keyword">use</span> <span class="hljs-title">PayPal</span>\<span class="hljs-title">Api</span>\<span class="hljs-title">Plan</span>;
|
<span class="hljs-keyword">use</span> <span class="hljs-title">PayPal</span>\<span class="hljs-title">Api</span>\<span class="hljs-title">Plan</span>;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<!DOCTYPE html><html lang="en"><head><title>billing/GetBillingAgreement</title></head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"><meta name="groc-relative-root" content="../"><meta name="groc-document-path" content="billing/GetBillingAgreement"><meta name="groc-project-path" content="billing/GetBillingAgreement.php"><link rel="stylesheet" type="text/css" media="all" href="../assets/style.css"><script type="text/javascript" src="../assets/behavior.js"></script><body><div id="meta"><div class="file-path">billing/GetBillingAgreement.php</div></div><div id="document"><div class="segment"><div class="code"><div class="wrapper"><span class="hljs-preprocessor"><?php</span></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h1 id="get-billing-agreement-sample">Get Billing Agreement Sample</h1>
|
<!DOCTYPE html><html lang="en"><head><title>billing/GetBillingAgreement</title></head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"><meta name="groc-relative-root" content="../"><meta name="groc-document-path" content="billing/GetBillingAgreement"><meta name="groc-project-path" content="billing/GetBillingAgreement.php"><link rel="stylesheet" type="text/css" media="all" href="../assets/style.css"><script type="text/javascript" src="../assets/behavior.js"></script><body><div id="meta"><div class="file-path">billing/GetBillingAgreement.php</div></div><div id="document"><div class="segment"><div class="code"><div class="wrapper"><span class="hljs-preprocessor"><?php</span></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h1 id="get-billing-agreement-sample">Get Billing Agreement Sample</h1>
|
||||||
<p>This sample code demonstrate how you can get a billing agreement, as documented here at:
|
<p>This sample code demonstrate how you can get a billing agreement, as documented here at:
|
||||||
<a href="https://developer.paypal.com/docs/api/#retrieve-an-agreement">https://developer.paypal.com/docs/api/#retrieve-an-agreement</a>
|
<a href="https://developer.paypal.com/docs/api/payments.billing-agreements/v1/#billing-agreements_get">https://developer.paypal.com/docs/api/payments.billing-agreements/v1/#billing-agreements_get</a>
|
||||||
API used: /v1/payments/billing-agreements/<Agreement-Id></p></div></div><div class="code"><div class="wrapper"><span class="hljs-keyword">require</span> <span class="hljs-keyword">__DIR__</span> . <span class="hljs-string">'/../bootstrap.php'</span>;</div></div></div><div class="segment"><div class="comments "><div class="wrapper"><p>Retrieving the Agreement object from Create Agreement From Credit Card Sample</p></div></div><div class="code"><div class="wrapper"><span class="hljs-comment">/** <span class="hljs-doctag">@var</span> Agreement $createdAgreement */</span>
|
API used: GET /v1/payments/billing-agreements/{agreement_id}</p></div></div><div class="code"><div class="wrapper"><span class="hljs-keyword">require</span> <span class="hljs-keyword">__DIR__</span> . <span class="hljs-string">'/../bootstrap.php'</span>;</div></div></div><div class="segment"><div class="comments "><div class="wrapper"><p>Retrieving the Agreement object from Create Agreement From Credit Card Sample</p></div></div><div class="code"><div class="wrapper"><span class="hljs-comment">/** <span class="hljs-doctag">@var</span> Agreement $createdAgreement */</span>
|
||||||
<span class="hljs-variable">$createdAgreement</span> = <span class="hljs-string">"your billing agreement id"</span>;
|
<span class="hljs-variable">$createdAgreement</span> = <span class="hljs-string">"your billing agreement id"</span>;
|
||||||
|
|
||||||
<span class="hljs-keyword">use</span> <span class="hljs-title">PayPal</span>\<span class="hljs-title">Api</span>\<span class="hljs-title">Agreement</span>;
|
<span class="hljs-keyword">use</span> <span class="hljs-title">PayPal</span>\<span class="hljs-title">Api</span>\<span class="hljs-title">Agreement</span>;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<!DOCTYPE html><html lang="en"><head><title>billing/GetPlan</title></head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"><meta name="groc-relative-root" content="../"><meta name="groc-document-path" content="billing/GetPlan"><meta name="groc-project-path" content="billing/GetPlan.php"><link rel="stylesheet" type="text/css" media="all" href="../assets/style.css"><script type="text/javascript" src="../assets/behavior.js"></script><body><div id="meta"><div class="file-path">billing/GetPlan.php</div></div><div id="document"><div class="segment"><div class="code"><div class="wrapper"><span class="hljs-preprocessor"><?php</span></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h1 id="get-plan-sample">Get Plan Sample</h1>
|
<!DOCTYPE html><html lang="en"><head><title>billing/GetPlan</title></head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"><meta name="groc-relative-root" content="../"><meta name="groc-document-path" content="billing/GetPlan"><meta name="groc-project-path" content="billing/GetPlan.php"><link rel="stylesheet" type="text/css" media="all" href="../assets/style.css"><script type="text/javascript" src="../assets/behavior.js"></script><body><div id="meta"><div class="file-path">billing/GetPlan.php</div></div><div id="document"><div class="segment"><div class="code"><div class="wrapper"><span class="hljs-preprocessor"><?php</span></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h1 id="get-plan-sample">Get Plan Sample</h1>
|
||||||
<p>This sample code demonstrate how you can get a billing plan, as documented here at:
|
<p>This sample code demonstrate how you can get a billing plan, as documented here at:
|
||||||
<a href="https://developer.paypal.com/docs/api/#retrieve-a-plan">https://developer.paypal.com/docs/api/#retrieve-a-plan</a>
|
<a href="https://developer.paypal.com/docs/api/payments.billing-plans/v1/#billing-plans_list">https://developer.paypal.com/docs/api/payments.billing-plans/v1/#billing-plans_list</a>
|
||||||
API used: /v1/payments/billing-plans</p></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><p>Retrieving the Plan object from Create Plan Sample</p></div></div><div class="code"><div class="wrapper"><span class="hljs-comment">/** <span class="hljs-doctag">@var</span> Plan $createdPlan */</span>
|
API used: GET /v1/payments/billing-plans/{plan_id}</p></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><p>Retrieving the Plan object from Create Plan Sample</p></div></div><div class="code"><div class="wrapper"><span class="hljs-comment">/** <span class="hljs-doctag">@var</span> Plan $createdPlan */</span>
|
||||||
<span class="hljs-variable">$createdPlan</span> = <span class="hljs-keyword">require</span> <span class="hljs-string">'CreatePlan.php'</span>;
|
<span class="hljs-variable">$createdPlan</span> = <span class="hljs-keyword">require</span> <span class="hljs-string">'CreatePlan.php'</span>;
|
||||||
|
|
||||||
<span class="hljs-keyword">use</span> <span class="hljs-title">PayPal</span>\<span class="hljs-title">Api</span>\<span class="hljs-title">Plan</span>;
|
<span class="hljs-keyword">use</span> <span class="hljs-title">PayPal</span>\<span class="hljs-title">Api</span>\<span class="hljs-title">Plan</span>;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<!DOCTYPE html><html lang="en"><head><title>billing/ListPlans</title></head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"><meta name="groc-relative-root" content="../"><meta name="groc-document-path" content="billing/ListPlans"><meta name="groc-project-path" content="billing/ListPlans.php"><link rel="stylesheet" type="text/css" media="all" href="../assets/style.css"><script type="text/javascript" src="../assets/behavior.js"></script><body><div id="meta"><div class="file-path">billing/ListPlans.php</div></div><div id="document"><div class="segment"><div class="code"><div class="wrapper"><span class="hljs-preprocessor"><?php</span></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h1 id="get-list-of-plan-sample">Get List of Plan Sample</h1>
|
<!DOCTYPE html><html lang="en"><head><title>billing/ListPlans</title></head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"><meta name="groc-relative-root" content="../"><meta name="groc-document-path" content="billing/ListPlans"><meta name="groc-project-path" content="billing/ListPlans.php"><link rel="stylesheet" type="text/css" media="all" href="../assets/style.css"><script type="text/javascript" src="../assets/behavior.js"></script><body><div id="meta"><div class="file-path">billing/ListPlans.php</div></div><div id="document"><div class="segment"><div class="code"><div class="wrapper"><span class="hljs-preprocessor"><?php</span></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h1 id="get-list-of-plan-sample">Get List of Plan Sample</h1>
|
||||||
<p>This sample code demonstrate how you can get a list of billing plan, as documented here at:
|
<p>This sample code demonstrate how you can get a list of billing plan, as documented here at:
|
||||||
<a href="https://developer.paypal.com/docs/api/#list-plans">https://developer.paypal.com/docs/api/#list-plans</a>
|
<a href="https://developer.paypal.com/docs/api/payments.billing-plans/v1/#billing-plans_list">https://developer.paypal.com/docs/api/payments.billing-plans/v1/#billing-plans_list</a>
|
||||||
API used: /v1/payments/billing-plans</p></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><p>Retrieving the Plan object from Create Plan Sample to demonstrate the List</p></div></div><div class="code"><div class="wrapper"><span class="hljs-comment">/** <span class="hljs-doctag">@var</span> Plan $createdPlan */</span>
|
API used: GET /v1/payments/billing-plans</p></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><p>Retrieving the Plan object from Create Plan Sample to demonstrate the List</p></div></div><div class="code"><div class="wrapper"><span class="hljs-comment">/** <span class="hljs-doctag">@var</span> Plan $createdPlan */</span>
|
||||||
<span class="hljs-variable">$createdPlan</span> = <span class="hljs-keyword">require</span> <span class="hljs-string">'CreatePlan.php'</span>;
|
<span class="hljs-variable">$createdPlan</span> = <span class="hljs-keyword">require</span> <span class="hljs-string">'CreatePlan.php'</span>;
|
||||||
|
|
||||||
<span class="hljs-keyword">use</span> <span class="hljs-title">PayPal</span>\<span class="hljs-title">Api</span>\<span class="hljs-title">Plan</span>;
|
<span class="hljs-keyword">use</span> <span class="hljs-title">PayPal</span>\<span class="hljs-title">Api</span>\<span class="hljs-title">Plan</span>;
|
||||||
@@ -9,7 +9,7 @@ API used: /v1/payments/billing-plans</p></div></div></div><div class="segment"><
|
|||||||
<span class="hljs-keyword">try</span> {</div></div></div><div class="segment"><div class="comments "><div class="wrapper"><p>Get the list of all plans
|
<span class="hljs-keyword">try</span> {</div></div></div><div class="segment"><div class="comments "><div class="wrapper"><p>Get the list of all plans
|
||||||
You can modify different params to change the return list.
|
You can modify different params to change the return list.
|
||||||
The explanation about each pagination information could be found here
|
The explanation about each pagination information could be found here
|
||||||
at <a href="https://developer.paypal.com/docs/api/#list-plans">https://developer.paypal.com/docs/api/#list-plans</a></p></div></div><div class="code"><div class="wrapper"> <span class="hljs-variable">$params</span> = <span class="hljs-keyword">array</span>(<span class="hljs-string">'page_size'</span> => <span class="hljs-string">'2'</span>);
|
at <a href="https://developer.paypal.com/docs/api/payments.billing-plans/v1/#billing-plans_list">https://developer.paypal.com/docs/api/payments.billing-plans/v1/#billing-plans_list</a></p></div></div><div class="code"><div class="wrapper"> <span class="hljs-variable">$params</span> = <span class="hljs-keyword">array</span>(<span class="hljs-string">'page_size'</span> => <span class="hljs-string">'2'</span>);
|
||||||
<span class="hljs-variable">$planList</span> = Plan::all(<span class="hljs-variable">$params</span>, <span class="hljs-variable">$apiContext</span>);
|
<span class="hljs-variable">$planList</span> = Plan::all(<span class="hljs-variable">$params</span>, <span class="hljs-variable">$apiContext</span>);
|
||||||
} <span class="hljs-keyword">catch</span> (<span class="hljs-keyword">Exception</span> <span class="hljs-variable">$ex</span>) {</div></div></div><div class="segment"><div class="comments "><div class="wrapper"><p>NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY</p></div></div><div class="code"><div class="wrapper"> ResultPrinter::printError(<span class="hljs-string">"List of Plans"</span>, <span class="hljs-string">"Plan"</span>, <span class="hljs-keyword">null</span>, <span class="hljs-variable">$params</span>, <span class="hljs-variable">$ex</span>);
|
} <span class="hljs-keyword">catch</span> (<span class="hljs-keyword">Exception</span> <span class="hljs-variable">$ex</span>) {</div></div></div><div class="segment"><div class="comments "><div class="wrapper"><p>NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY</p></div></div><div class="code"><div class="wrapper"> ResultPrinter::printError(<span class="hljs-string">"List of Plans"</span>, <span class="hljs-string">"Plan"</span>, <span class="hljs-keyword">null</span>, <span class="hljs-variable">$params</span>, <span class="hljs-variable">$ex</span>);
|
||||||
<span class="hljs-keyword">exit</span>(<span class="hljs-number">1</span>);
|
<span class="hljs-keyword">exit</span>(<span class="hljs-number">1</span>);
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<!DOCTYPE html><html lang="en"><head><title>billing/ReactivateBillingAgreement</title></head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"><meta name="groc-relative-root" content="../"><meta name="groc-document-path" content="billing/ReactivateBillingAgreement"><meta name="groc-project-path" content="billing/ReactivateBillingAgreement.php"><link rel="stylesheet" type="text/css" media="all" href="../assets/style.css"><script type="text/javascript" src="../assets/behavior.js"></script><body><div id="meta"><div class="file-path">billing/ReactivateBillingAgreement.php</div></div><div id="document"><div class="segment"><div class="code"><div class="wrapper"><span class="hljs-preprocessor"><?php</span></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h1 id="reactivate-an-agreement">Reactivate an agreement</h1>
|
<!DOCTYPE html><html lang="en"><head><title>billing/ReactivateBillingAgreement</title></head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"><meta name="groc-relative-root" content="../"><meta name="groc-document-path" content="billing/ReactivateBillingAgreement"><meta name="groc-project-path" content="billing/ReactivateBillingAgreement.php"><link rel="stylesheet" type="text/css" media="all" href="../assets/style.css"><script type="text/javascript" src="../assets/behavior.js"></script><body><div id="meta"><div class="file-path">billing/ReactivateBillingAgreement.php</div></div><div id="document"><div class="segment"><div class="code"><div class="wrapper"><span class="hljs-preprocessor"><?php</span></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h1 id="reactivate-an-agreement">Reactivate an agreement</h1>
|
||||||
<p>This sample code demonstrate how you can reactivate a billing agreement, as documented here at:
|
<p>This sample code demonstrate how you can reactivate a billing agreement, as documented here at:
|
||||||
<a href="https://developer.paypal.com/docs/api/#suspend-an-agreement">https://developer.paypal.com/docs/api/#suspend-an-agreement</a>
|
<a href="https://developer.paypal.com/docs/api/payments.billing-agreements/v1/#billing-agreements_re-activate">https://developer.paypal.com/docs/api/payments.billing-agreements/v1/#billing-agreements_re-activate</a>
|
||||||
API used: /v1/payments/billing-agreements/<Agreement-Id>/suspend</p></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><p>Retrieving the Agreement object from Suspend Agreement Sample to demonstrate the List</p></div></div><div class="code"><div class="wrapper"><span class="hljs-comment">/** <span class="hljs-doctag">@var</span> Agreement $suspendedAgreement */</span>
|
API used: POST /v1/payments/billing-agreements/{agreement_id}/re-activate</p></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><p>Retrieving the Agreement object from Suspend Agreement Sample to demonstrate the List</p></div></div><div class="code"><div class="wrapper"><span class="hljs-comment">/** <span class="hljs-doctag">@var</span> Agreement $suspendedAgreement */</span>
|
||||||
<span class="hljs-variable">$suspendedAgreement</span> = <span class="hljs-keyword">require</span> <span class="hljs-string">'SuspendBillingAgreement.php'</span>;
|
<span class="hljs-variable">$suspendedAgreement</span> = <span class="hljs-keyword">require</span> <span class="hljs-string">'SuspendBillingAgreement.php'</span>;
|
||||||
|
|
||||||
<span class="hljs-keyword">use</span> <span class="hljs-title">PayPal</span>\<span class="hljs-title">Api</span>\<span class="hljs-title">Agreement</span>;
|
<span class="hljs-keyword">use</span> <span class="hljs-title">PayPal</span>\<span class="hljs-title">Api</span>\<span class="hljs-title">Agreement</span>;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<!DOCTYPE html><html lang="en"><head><title>billing/SearchBillingTransactions</title></head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"><meta name="groc-relative-root" content="../"><meta name="groc-document-path" content="billing/SearchBillingTransactions"><meta name="groc-project-path" content="billing/SearchBillingTransactions.php"><link rel="stylesheet" type="text/css" media="all" href="../assets/style.css"><script type="text/javascript" src="../assets/behavior.js"></script><body><div id="meta"><div class="file-path">billing/SearchBillingTransactions.php</div></div><div id="document"><div class="segment"><div class="code"><div class="wrapper"><span class="hljs-preprocessor"><?php</span></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h1 id="search-billing-transactions-sample">Search Billing Transactions Sample</h1>
|
<!DOCTYPE html><html lang="en"><head><title>billing/SearchBillingTransactions</title></head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"><meta name="groc-relative-root" content="../"><meta name="groc-document-path" content="billing/SearchBillingTransactions"><meta name="groc-project-path" content="billing/SearchBillingTransactions.php"><link rel="stylesheet" type="text/css" media="all" href="../assets/style.css"><script type="text/javascript" src="../assets/behavior.js"></script><body><div id="meta"><div class="file-path">billing/SearchBillingTransactions.php</div></div><div id="document"><div class="segment"><div class="code"><div class="wrapper"><span class="hljs-preprocessor"><?php</span></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h1 id="search-billing-transactions-sample">Search Billing Transactions Sample</h1>
|
||||||
<p>This sample code demonstrate how you can search all billing transactions, as documented here at:
|
<p>This sample code demonstrate how you can search all billing transactions, as documented here at:
|
||||||
<a href="https://developer.paypal.com/docs/api/#search-for-transactions">https://developer.paypal.com/docs/api/#search-for-transactions</a>
|
<a href="https://developer.paypal.com/docs/api/payments.billing-agreements/v1/#billing-agreements_transactions">https://developer.paypal.com/docs/api/payments.billing-agreements/v1/#billing-agreements_transactions</a>
|
||||||
API used: GET /v1/payments/billing-agreements/<Agreement-Id>/transactions? start-date=yyyy-mm-dd&end-date=yyyy-mm-dd</p></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><p>Retrieving the Agreement object from Get Billing Agreement. This may not be necessary if you are trying to search for transactions of already created Agreement.</p></div></div><div class="code"><div class="wrapper"><span class="hljs-comment">/** <span class="hljs-doctag">@var</span> Agreement $agreement */</span>
|
API used: GET /v1/payments/billing-agreements/{agreement_id}/transactions? start-date=yyyy-mm-dd&end-date=yyyy-mm-dd</p></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><p>Retrieving the Agreement object from Get Billing Agreement. This may not be necessary if you are trying to search for transactions of already created Agreement.</p></div></div><div class="code"><div class="wrapper"><span class="hljs-comment">/** <span class="hljs-doctag">@var</span> Agreement $agreement */</span>
|
||||||
<span class="hljs-variable">$agreement</span> = <span class="hljs-keyword">require</span> <span class="hljs-string">'GetBillingAgreement.php'</span>;</div></div></div><div class="segment"><div class="comments "><div class="wrapper"><p>Replace this with your AgreementId to search transactions based on your agreement.</p></div></div><div class="code"><div class="wrapper"><span class="hljs-variable">$agreementId</span> = <span class="hljs-variable">$agreement</span>->getId();
|
<span class="hljs-variable">$agreement</span> = <span class="hljs-keyword">require</span> <span class="hljs-string">'GetBillingAgreement.php'</span>;</div></div></div><div class="segment"><div class="comments "><div class="wrapper"><p>Replace this with your AgreementId to search transactions based on your agreement.</p></div></div><div class="code"><div class="wrapper"><span class="hljs-variable">$agreementId</span> = <span class="hljs-variable">$agreement</span>->getId();
|
||||||
|
|
||||||
<span class="hljs-keyword">use</span> <span class="hljs-title">PayPal</span>\<span class="hljs-title">Api</span>\<span class="hljs-title">Agreement</span>;</div></div></div><div class="segment"><div class="comments "><div class="wrapper"><p>Adding Params to search transaction within a given time frame.</p></div></div><div class="code"><div class="wrapper"><span class="hljs-variable">$params</span> = <span class="hljs-keyword">array</span>(<span class="hljs-string">'start_date'</span> => date(<span class="hljs-string">'Y-m-d'</span>, strtotime(<span class="hljs-string">'-15 years'</span>)), <span class="hljs-string">'end_date'</span> => date(<span class="hljs-string">'Y-m-d'</span>, strtotime(<span class="hljs-string">'+5 days'</span>)));
|
<span class="hljs-keyword">use</span> <span class="hljs-title">PayPal</span>\<span class="hljs-title">Api</span>\<span class="hljs-title">Agreement</span>;</div></div></div><div class="segment"><div class="comments "><div class="wrapper"><p>Adding Params to search transaction within a given time frame.</p></div></div><div class="code"><div class="wrapper"><span class="hljs-variable">$params</span> = <span class="hljs-keyword">array</span>(<span class="hljs-string">'start_date'</span> => date(<span class="hljs-string">'Y-m-d'</span>, strtotime(<span class="hljs-string">'-15 years'</span>)), <span class="hljs-string">'end_date'</span> => date(<span class="hljs-string">'Y-m-d'</span>, strtotime(<span class="hljs-string">'+5 days'</span>)));
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<!DOCTYPE html><html lang="en"><head><title>billing/SuspendBillingAgreement</title></head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"><meta name="groc-relative-root" content="../"><meta name="groc-document-path" content="billing/SuspendBillingAgreement"><meta name="groc-project-path" content="billing/SuspendBillingAgreement.php"><link rel="stylesheet" type="text/css" media="all" href="../assets/style.css"><script type="text/javascript" src="../assets/behavior.js"></script><body><div id="meta"><div class="file-path">billing/SuspendBillingAgreement.php</div></div><div id="document"><div class="segment"><div class="code"><div class="wrapper"><span class="hljs-preprocessor"><?php</span></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h1 id="suspend-an-agreement">Suspend an agreement</h1>
|
<!DOCTYPE html><html lang="en"><head><title>billing/SuspendBillingAgreement</title></head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"><meta name="groc-relative-root" content="../"><meta name="groc-document-path" content="billing/SuspendBillingAgreement"><meta name="groc-project-path" content="billing/SuspendBillingAgreement.php"><link rel="stylesheet" type="text/css" media="all" href="../assets/style.css"><script type="text/javascript" src="../assets/behavior.js"></script><body><div id="meta"><div class="file-path">billing/SuspendBillingAgreement.php</div></div><div id="document"><div class="segment"><div class="code"><div class="wrapper"><span class="hljs-preprocessor"><?php</span></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h1 id="suspend-an-agreement">Suspend an agreement</h1>
|
||||||
<p>This sample code demonstrate how you can suspend a billing agreement, as documented here at:
|
<p>This sample code demonstrate how you can suspend a billing agreement, as documented here at:
|
||||||
<a href="https://developer.paypal.com/docs/api/#suspend-an-agreement">https://developer.paypal.com/docs/api/#suspend-an-agreement</a>
|
<a href="https://developer.paypal.com/docs/api/payments.billing-agreements/v1/#billing-agreements_suspend">https://developer.paypal.com/docs/api/payments.billing-agreements/v1/#billing-agreements_suspend</a>
|
||||||
API used: /v1/payments/billing-agreements/<Agreement-Id>/suspend</p></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><p>Retrieving the Agreement object from Create Agreement Sample to demonstrate the List</p></div></div><div class="code"><div class="wrapper"><span class="hljs-keyword">require</span> <span class="hljs-keyword">__DIR__</span> . <span class="hljs-string">'/../bootstrap.php'</span>;
|
API used: POST /v1/payments/billing-agreements/{agreement_id}/suspend</p></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><p>Retrieving the Agreement object from Create Agreement Sample to demonstrate the List</p></div></div><div class="code"><div class="wrapper"><span class="hljs-keyword">require</span> <span class="hljs-keyword">__DIR__</span> . <span class="hljs-string">'/../bootstrap.php'</span>;
|
||||||
|
|
||||||
<span class="hljs-keyword">use</span> <span class="hljs-title">PayPal</span>\<span class="hljs-title">Api</span>\<span class="hljs-title">Agreement</span>;
|
<span class="hljs-keyword">use</span> <span class="hljs-title">PayPal</span>\<span class="hljs-title">Api</span>\<span class="hljs-title">Agreement</span>;
|
||||||
<span class="hljs-keyword">use</span> <span class="hljs-title">PayPal</span>\<span class="hljs-title">Api</span>\<span class="hljs-title">AgreementStateDescriptor</span>;
|
<span class="hljs-keyword">use</span> <span class="hljs-title">PayPal</span>\<span class="hljs-title">Api</span>\<span class="hljs-title">AgreementStateDescriptor</span>;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<!DOCTYPE html><html lang="en"><head><title>billing/UpdateBillingAgreement</title></head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"><meta name="groc-relative-root" content="../"><meta name="groc-document-path" content="billing/UpdateBillingAgreement"><meta name="groc-project-path" content="billing/UpdateBillingAgreement.php"><link rel="stylesheet" type="text/css" media="all" href="../assets/style.css"><script type="text/javascript" src="../assets/behavior.js"></script><body><div id="meta"><div class="file-path">billing/UpdateBillingAgreement.php</div></div><div id="document"><div class="segment"><div class="code"><div class="wrapper"><span class="hljs-preprocessor"><?php</span></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h1 id="update-an-agreement">Update an agreement</h1>
|
<!DOCTYPE html><html lang="en"><head><title>billing/UpdateBillingAgreement</title></head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"><meta name="groc-relative-root" content="../"><meta name="groc-document-path" content="billing/UpdateBillingAgreement"><meta name="groc-project-path" content="billing/UpdateBillingAgreement.php"><link rel="stylesheet" type="text/css" media="all" href="../assets/style.css"><script type="text/javascript" src="../assets/behavior.js"></script><body><div id="meta"><div class="file-path">billing/UpdateBillingAgreement.php</div></div><div id="document"><div class="segment"><div class="code"><div class="wrapper"><span class="hljs-preprocessor"><?php</span></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h1 id="update-an-agreement">Update an agreement</h1>
|
||||||
<p>This sample code demonstrate how you can update a billing agreement, as documented here at:
|
<p>This sample code demonstrate how you can update a billing agreement, as documented here at:
|
||||||
<a href="https://developer.paypal.com/docs/api/#update-an-agreement">https://developer.paypal.com/docs/api/#update-an-agreement</a>
|
<a href="https://developer.paypal.com/docs/api/payments.billing-agreements/v1/#billing-agreements_patch">https://developer.paypal.com/docs/api/payments.billing-agreements/v1/#billing-agreements_patch</a>
|
||||||
API used: /v1/payments/billing-agreements/<Agreement-Id></p></div></div><div class="code"><div class="wrapper"><span class="hljs-keyword">require</span> <span class="hljs-keyword">__DIR__</span> . <span class="hljs-string">'/../bootstrap.php'</span>;</div></div></div><div class="segment"><div class="comments "><div class="wrapper"><p>Retrieving the Agreement object from Create Agreement Sample to demonstrate the List</p></div></div><div class="code"><div class="wrapper"><span class="hljs-comment">/** <span class="hljs-doctag">@var</span> Agreement $createdAgreement */</span>
|
API used: PATCH /v1/payments/billing-agreements/{agreement_id}</p></div></div><div class="code"><div class="wrapper"><span class="hljs-keyword">require</span> <span class="hljs-keyword">__DIR__</span> . <span class="hljs-string">'/../bootstrap.php'</span>;</div></div></div><div class="segment"><div class="comments "><div class="wrapper"><p>Retrieving the Agreement object from Create Agreement Sample to demonstrate the List</p></div></div><div class="code"><div class="wrapper"><span class="hljs-comment">/** <span class="hljs-doctag">@var</span> Agreement $createdAgreement */</span>
|
||||||
<span class="hljs-variable">$createdAgreement</span> = <span class="hljs-string">'your agreement id'</span>;
|
<span class="hljs-variable">$createdAgreement</span> = <span class="hljs-string">'your agreement id'</span>;
|
||||||
|
|
||||||
<span class="hljs-keyword">use</span> <span class="hljs-title">PayPal</span>\<span class="hljs-title">Api</span>\<span class="hljs-title">Agreement</span>;
|
<span class="hljs-keyword">use</span> <span class="hljs-title">PayPal</span>\<span class="hljs-title">Api</span>\<span class="hljs-title">Agreement</span>;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<!DOCTYPE html><html lang="en"><head><title>billing/UpdatePlan</title></head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"><meta name="groc-relative-root" content="../"><meta name="groc-document-path" content="billing/UpdatePlan"><meta name="groc-project-path" content="billing/UpdatePlan.php"><link rel="stylesheet" type="text/css" media="all" href="../assets/style.css"><script type="text/javascript" src="../assets/behavior.js"></script><body><div id="meta"><div class="file-path">billing/UpdatePlan.php</div></div><div id="document"><div class="segment"><div class="code"><div class="wrapper"><span class="hljs-preprocessor"><?php</span></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h1 id="update-a-plan">Update a plan</h1>
|
<!DOCTYPE html><html lang="en"><head><title>billing/UpdatePlan</title></head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"><meta name="groc-relative-root" content="../"><meta name="groc-document-path" content="billing/UpdatePlan"><meta name="groc-project-path" content="billing/UpdatePlan.php"><link rel="stylesheet" type="text/css" media="all" href="../assets/style.css"><script type="text/javascript" src="../assets/behavior.js"></script><body><div id="meta"><div class="file-path">billing/UpdatePlan.php</div></div><div id="document"><div class="segment"><div class="code"><div class="wrapper"><span class="hljs-preprocessor"><?php</span></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h1 id="update-a-plan">Update a plan</h1>
|
||||||
<p>This sample code demonstrate how you can update a billing plan, as documented here at:
|
<p>This sample code demonstrate how you can update a billing plan, as documented here at:
|
||||||
<a href="https://developer.paypal.com/docs/api/#update-a-plan">https://developer.paypal.com/docs/api/#update-a-plan</a>
|
<a href="https://developer.paypal.com/docs/api/payments.billing-plans/v1/#billing-plans_patch">https://developer.paypal.com/docs/api/payments.billing-plans/v1/#billing-plans_patch</a>
|
||||||
API used: /v1/payments/billing-plans/<Plan-Id></p></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h3 id="making-plan-active">Making Plan Active</h3>
|
API used: PATCH /v1/payments/billing-plans/{plan_id}</p></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h3 id="making-plan-active">Making Plan Active</h3>
|
||||||
<p>This example demonstrate how you could activate the Plan.</p></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><p>Retrieving the Plan object from Create Plan Sample to demonstrate the List</p></div></div><div class="code"><div class="wrapper"><span class="hljs-comment">/** <span class="hljs-doctag">@var</span> Plan $createdPlan */</span>
|
<p>This example demonstrate how you could activate the Plan.</p></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><p>Retrieving the Plan object from Create Plan Sample to demonstrate the List</p></div></div><div class="code"><div class="wrapper"><span class="hljs-comment">/** <span class="hljs-doctag">@var</span> Plan $createdPlan */</span>
|
||||||
<span class="hljs-variable">$createdPlan</span> = <span class="hljs-keyword">require</span> <span class="hljs-string">'CreatePlan.php'</span>;
|
<span class="hljs-variable">$createdPlan</span> = <span class="hljs-keyword">require</span> <span class="hljs-string">'CreatePlan.php'</span>;
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<!DOCTYPE html><html lang="en"><head><title>billing/UpdatePlanPaymentDefinitions</title></head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"><meta name="groc-relative-root" content="../"><meta name="groc-document-path" content="billing/UpdatePlanPaymentDefinitions"><meta name="groc-project-path" content="billing/UpdatePlanPaymentDefinitions.php"><link rel="stylesheet" type="text/css" media="all" href="../assets/style.css"><script type="text/javascript" src="../assets/behavior.js"></script><body><div id="meta"><div class="file-path">billing/UpdatePlanPaymentDefinitions.php</div></div><div id="document"><div class="segment"><div class="code"><div class="wrapper"><span class="hljs-preprocessor"><?php</span></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h1 id="update-a-plan">Update a plan</h1>
|
<!DOCTYPE html><html lang="en"><head><title>billing/UpdatePlanPaymentDefinitions</title></head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"><meta name="groc-relative-root" content="../"><meta name="groc-document-path" content="billing/UpdatePlanPaymentDefinitions"><meta name="groc-project-path" content="billing/UpdatePlanPaymentDefinitions.php"><link rel="stylesheet" type="text/css" media="all" href="../assets/style.css"><script type="text/javascript" src="../assets/behavior.js"></script><body><div id="meta"><div class="file-path">billing/UpdatePlanPaymentDefinitions.php</div></div><div id="document"><div class="segment"><div class="code"><div class="wrapper"><span class="hljs-preprocessor"><?php</span></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h1 id="update-a-plan">Update a plan</h1>
|
||||||
<p>This sample code demonstrate how you can update a billing plan, as documented here at:
|
<p>This sample code demonstrate how you can update a billing plan, as documented here at:
|
||||||
<a href="https://developer.paypal.com/docs/api/#update-a-plan">https://developer.paypal.com/docs/api/#update-a-plan</a>
|
<a href="https://developer.paypal.com/docs/api/payments.billing-plans/v1/#billing-plans_patch">https://developer.paypal.com/docs/api/payments.billing-plans/v1/#billing-plans_patch</a>
|
||||||
API used: /v1/payments/billing-plans/<Plan-Id></p></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h3 id="changing-plan-amount">Changing Plan Amount</h3>
|
API used: PATCH /v1/payments/billing-plans/{plan_id}</p></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h3 id="changing-plan-amount">Changing Plan Amount</h3>
|
||||||
<p>This example demonstrate how you could change the plan amount</p></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><p>Retrieving the Plan object from Create Plan Sample to demonstrate the List</p></div></div><div class="code"><div class="wrapper"><span class="hljs-comment">/** <span class="hljs-doctag">@var</span> Plan $createdPlan */</span>
|
<p>This example demonstrate how you could change the plan amount</p></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><p>Retrieving the Plan object from Create Plan Sample to demonstrate the List</p></div></div><div class="code"><div class="wrapper"><span class="hljs-comment">/** <span class="hljs-doctag">@var</span> Plan $createdPlan */</span>
|
||||||
<span class="hljs-variable">$createdPlan</span> = <span class="hljs-keyword">require</span> <span class="hljs-string">'CreatePlan.php'</span>;
|
<span class="hljs-variable">$createdPlan</span> = <span class="hljs-keyword">require</span> <span class="hljs-string">'CreatePlan.php'</span>;
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<!DOCTYPE html><html lang="en"><head><title>notifications/CreateWebhook</title></head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"><meta name="groc-relative-root" content="../"><meta name="groc-document-path" content="notifications/CreateWebhook"><meta name="groc-project-path" content="notifications/CreateWebhook.php"><link rel="stylesheet" type="text/css" media="all" href="../assets/style.css"><script type="text/javascript" src="../assets/behavior.js"></script><body><div id="meta"><div class="file-path">notifications/CreateWebhook.php</div></div><div id="document"><div class="segment"><div class="code"><div class="wrapper"><span class="hljs-preprocessor"><?php</span></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h1 id="create-webhook-sample">Create Webhook Sample</h1>
|
<!DOCTYPE html><html lang="en"><head><title>notifications/CreateWebhook</title></head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"><meta name="groc-relative-root" content="../"><meta name="groc-document-path" content="notifications/CreateWebhook"><meta name="groc-project-path" content="notifications/CreateWebhook.php"><link rel="stylesheet" type="text/css" media="all" href="../assets/style.css"><script type="text/javascript" src="../assets/behavior.js"></script><body><div id="meta"><div class="file-path">notifications/CreateWebhook.php</div></div><div id="document"><div class="segment"><div class="code"><div class="wrapper"><span class="hljs-preprocessor"><?php</span></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h1 id="create-webhook-sample">Create Webhook Sample</h1>
|
||||||
<p>This sample code demonstrate how you can create a webhook, as documented here at:
|
<p>This sample code demonstrate how you can create a webhook, as documented here at:
|
||||||
<a href="https://developer.paypal.com/docs/api/#create-a-webhook">https://developer.paypal.com/docs/api/#create-a-webhook</a>
|
<a href="https://developer.paypal.com/docs/api/webhooks/v1/#webhooks_post">https://developer.paypal.com/docs/api/webhooks/v1/#webhooks_post</a>
|
||||||
API used: POST /v1/notifications/webhooks</p></div></div><div class="code"><div class="wrapper"><span class="hljs-keyword">require</span> <span class="hljs-keyword">__DIR__</span> . <span class="hljs-string">'/../bootstrap.php'</span>;</div></div></div><div class="segment"><div class="comments "><div class="wrapper"><p>Create a new instance of Webhook object</p></div></div><div class="code"><div class="wrapper"><span class="hljs-variable">$webhook</span> = <span class="hljs-keyword">new</span> \PayPal\Api\Webhook();</div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h1 id="basic-information">Basic Information</h1>
|
API used: POST /v1/notifications/webhooks</p></div></div><div class="code"><div class="wrapper"><span class="hljs-keyword">require</span> <span class="hljs-keyword">__DIR__</span> . <span class="hljs-string">'/../bootstrap.php'</span>;</div></div></div><div class="segment"><div class="comments "><div class="wrapper"><p>Create a new instance of Webhook object</p></div></div><div class="code"><div class="wrapper"><span class="hljs-variable">$webhook</span> = <span class="hljs-keyword">new</span> \PayPal\Api\Webhook();</div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h1 id="basic-information">Basic Information</h1>
|
||||||
<pre><code>{
|
<pre><code>{
|
||||||
"url":"https://requestb.in/10ujt3c1",
|
"url":"https://requestb.in/10ujt3c1",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<!DOCTYPE html><html lang="en"><head><title>notifications/DeleteWebhook</title></head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"><meta name="groc-relative-root" content="../"><meta name="groc-document-path" content="notifications/DeleteWebhook"><meta name="groc-project-path" content="notifications/DeleteWebhook.php"><link rel="stylesheet" type="text/css" media="all" href="../assets/style.css"><script type="text/javascript" src="../assets/behavior.js"></script><body><div id="meta"><div class="file-path">notifications/DeleteWebhook.php</div></div><div id="document"><div class="segment"><div class="code"><div class="wrapper"><span class="hljs-preprocessor"><?php</span></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h1 id="delete-webhook-sample">Delete Webhook Sample</h1>
|
<!DOCTYPE html><html lang="en"><head><title>notifications/DeleteWebhook</title></head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"><meta name="groc-relative-root" content="../"><meta name="groc-document-path" content="notifications/DeleteWebhook"><meta name="groc-project-path" content="notifications/DeleteWebhook.php"><link rel="stylesheet" type="text/css" media="all" href="../assets/style.css"><script type="text/javascript" src="../assets/behavior.js"></script><body><div id="meta"><div class="file-path">notifications/DeleteWebhook.php</div></div><div id="document"><div class="segment"><div class="code"><div class="wrapper"><span class="hljs-preprocessor"><?php</span></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h1 id="delete-webhook-sample">Delete Webhook Sample</h1>
|
||||||
<p>This sample code demonstrate how to use this call to search for all webhook events., as documented here at:
|
<p>This sample code demonstrate how to use this call to search for all webhook events., as documented here at:
|
||||||
<a href="https://developer.paypal.com/docs/api/#delete-a-webhook">https://developer.paypal.com/docs/api/#delete-a-webhook</a>
|
<a href="https://developer.paypal.com/docs/api/webhooks/v1/#webhooks_delete">https://developer.paypal.com/docs/api/webhooks/v1/#webhooks_delete</a>
|
||||||
API used: DELETE v1/notifications/webhooks/<Webhook-Id></p></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h2 id="get-webhook-instance">Get Webhook Instance</h2></div></div></div><div class="segment"><div class="code"><div class="wrapper"><span class="hljs-comment">/** <span class="hljs-doctag">@var</span> \PayPal\Api\Webhook $webhook */</span>
|
API used: DELETE v1/notifications/webhooks/<Webhook-Id></p></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h2 id="get-webhook-instance">Get Webhook Instance</h2></div></div></div><div class="segment"><div class="code"><div class="wrapper"><span class="hljs-comment">/** <span class="hljs-doctag">@var</span> \PayPal\Api\Webhook $webhook */</span>
|
||||||
<span class="hljs-variable">$webhook</span> = <span class="hljs-keyword">require</span> <span class="hljs-string">'CreateWebhook.php'</span>;</div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h3 id="delete-webhook">Delete Webhook</h3></div></div></div><div class="segment"><div class="code"><div class="wrapper"><span class="hljs-keyword">try</span> {
|
<span class="hljs-variable">$webhook</span> = <span class="hljs-keyword">require</span> <span class="hljs-string">'CreateWebhook.php'</span>;</div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h3 id="delete-webhook">Delete Webhook</h3></div></div></div><div class="segment"><div class="code"><div class="wrapper"><span class="hljs-keyword">try</span> {
|
||||||
<span class="hljs-variable">$output</span> = <span class="hljs-variable">$webhook</span>->delete(<span class="hljs-variable">$apiContext</span>);
|
<span class="hljs-variable">$output</span> = <span class="hljs-variable">$webhook</span>->delete(<span class="hljs-variable">$apiContext</span>);
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<!DOCTYPE html><html lang="en"><head><title>notifications/GetWebhook</title></head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"><meta name="groc-relative-root" content="../"><meta name="groc-document-path" content="notifications/GetWebhook"><meta name="groc-project-path" content="notifications/GetWebhook.php"><link rel="stylesheet" type="text/css" media="all" href="../assets/style.css"><script type="text/javascript" src="../assets/behavior.js"></script><body><div id="meta"><div class="file-path">notifications/GetWebhook.php</div></div><div id="document"><div class="segment"><div class="code"><div class="wrapper"><span class="hljs-preprocessor"><?php</span></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h1 id="get-webhook-sample">Get Webhook Sample</h1>
|
<!DOCTYPE html><html lang="en"><head><title>notifications/GetWebhook</title></head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"><meta name="groc-relative-root" content="../"><meta name="groc-document-path" content="notifications/GetWebhook"><meta name="groc-project-path" content="notifications/GetWebhook.php"><link rel="stylesheet" type="text/css" media="all" href="../assets/style.css"><script type="text/javascript" src="../assets/behavior.js"></script><body><div id="meta"><div class="file-path">notifications/GetWebhook.php</div></div><div id="document"><div class="segment"><div class="code"><div class="wrapper"><span class="hljs-preprocessor"><?php</span></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h1 id="get-webhook-sample">Get Webhook Sample</h1>
|
||||||
<p>This sample code demonstrate how you can get a webhook, as documented here at:
|
<p>This sample code demonstrate how you can get a webhook, as documented here at:
|
||||||
<a href="https://developer.paypal.com/docs/api/#get-a-webhook">https://developer.paypal.com/docs/api/#get-a-webhook</a>
|
<a href="https://developer.paypal.com/docs/api/webhooks/v1/#webhooks_get">https://developer.paypal.com/docs/api/webhooks/v1/#webhooks_get</a>
|
||||||
API used: GET /v1/notifications/webhooks/<Webhook-Id></p></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h2 id="get-webhook-id">Get Webhook ID.</h2>
|
API used: GET /v1/notifications/webhooks/<Webhook-Id></p></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h2 id="get-webhook-id">Get Webhook ID.</h2>
|
||||||
<p>In samples we are using CreateWebhook.php sample to get the created instance of webhook.
|
<p>In samples we are using CreateWebhook.php sample to get the created instance of webhook.
|
||||||
However, in real case scenario, we could use just the ID from database or retrieved from the form.</p></div></div><div class="code"><div class="wrapper"><span class="hljs-comment">/** <span class="hljs-doctag">@var</span> \PayPal\Api\Webhook $webhook */</span>
|
However, in real case scenario, we could use just the ID from database or retrieved from the form.</p></div></div><div class="code"><div class="wrapper"><span class="hljs-comment">/** <span class="hljs-doctag">@var</span> \PayPal\Api\Webhook $webhook */</span>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<!DOCTYPE html><html lang="en"><head><title>notifications/ListSubscribedWebhookEventTypes</title></head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"><meta name="groc-relative-root" content="../"><meta name="groc-document-path" content="notifications/ListSubscribedWebhookEventTypes"><meta name="groc-project-path" content="notifications/ListSubscribedWebhookEventTypes.php"><link rel="stylesheet" type="text/css" media="all" href="../assets/style.css"><script type="text/javascript" src="../assets/behavior.js"></script><body><div id="meta"><div class="file-path">notifications/ListSubscribedWebhookEventTypes.php</div></div><div id="document"><div class="segment"><div class="code"><div class="wrapper"><span class="hljs-preprocessor"><?php</span></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h1 id="get-webhook-sample">Get Webhook Sample</h1>
|
<!DOCTYPE html><html lang="en"><head><title>notifications/ListSubscribedWebhookEventTypes</title></head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"><meta name="groc-relative-root" content="../"><meta name="groc-document-path" content="notifications/ListSubscribedWebhookEventTypes"><meta name="groc-project-path" content="notifications/ListSubscribedWebhookEventTypes.php"><link rel="stylesheet" type="text/css" media="all" href="../assets/style.css"><script type="text/javascript" src="../assets/behavior.js"></script><body><div id="meta"><div class="file-path">notifications/ListSubscribedWebhookEventTypes.php</div></div><div id="document"><div class="segment"><div class="code"><div class="wrapper"><span class="hljs-preprocessor"><?php</span></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h1 id="get-webhook-sample">Get Webhook Sample</h1>
|
||||||
<p>This sample code demonstrate how you can get a webhook, as documented here at:
|
<p>This sample code demonstrate how you can get a webhook, as documented here at:
|
||||||
<a href="https://developer.paypal.com/docs/api/#get-a-webhook">https://developer.paypal.com/docs/api/#get-a-webhook</a>
|
<a href="https://developer.paypal.com/docs/api/webhooks/v1/#webhooks_get">https://developer.paypal.com/docs/api/webhooks/v1/#webhooks_get</a>
|
||||||
API used: GET /v1/notifications/webhooks/<Webhook-Id></p></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h2 id="list-subscribed-event-types">List Subscribed Event Types</h2>
|
API used: GET /v1/notifications/webhooks/<Webhook-Id></p></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h2 id="list-subscribed-event-types">List Subscribed Event Types</h2>
|
||||||
<p>Use this call to retrieve the list of events types that are subscribed to a webhook.</p></div></div><div class="code"><div class="wrapper"><span class="hljs-comment">/** <span class="hljs-doctag">@var</span> \PayPal\Api\Webhook $webhook */</span>
|
<p>Use this call to retrieve the list of events types that are subscribed to a webhook.</p></div></div><div class="code"><div class="wrapper"><span class="hljs-comment">/** <span class="hljs-doctag">@var</span> \PayPal\Api\Webhook $webhook */</span>
|
||||||
<span class="hljs-variable">$webhook</span> = <span class="hljs-keyword">require</span> <span class="hljs-string">'CreateWebhook.php'</span>;
|
<span class="hljs-variable">$webhook</span> = <span class="hljs-keyword">require</span> <span class="hljs-string">'CreateWebhook.php'</span>;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<!DOCTYPE html><html lang="en"><head><title>notifications/ListWebhooks</title></head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"><meta name="groc-relative-root" content="../"><meta name="groc-document-path" content="notifications/ListWebhooks"><meta name="groc-project-path" content="notifications/ListWebhooks.php"><link rel="stylesheet" type="text/css" media="all" href="../assets/style.css"><script type="text/javascript" src="../assets/behavior.js"></script><body><div id="meta"><div class="file-path">notifications/ListWebhooks.php</div></div><div id="document"><div class="segment"><div class="code"><div class="wrapper"><span class="hljs-preprocessor"><?php</span></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h1 id="get-all-webhooks-sample">Get All Webhooks Sample</h1>
|
<!DOCTYPE html><html lang="en"><head><title>notifications/ListWebhooks</title></head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"><meta name="groc-relative-root" content="../"><meta name="groc-document-path" content="notifications/ListWebhooks"><meta name="groc-project-path" content="notifications/ListWebhooks.php"><link rel="stylesheet" type="text/css" media="all" href="../assets/style.css"><script type="text/javascript" src="../assets/behavior.js"></script><body><div id="meta"><div class="file-path">notifications/ListWebhooks.php</div></div><div id="document"><div class="segment"><div class="code"><div class="wrapper"><span class="hljs-preprocessor"><?php</span></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h1 id="get-all-webhooks-sample">Get All Webhooks Sample</h1>
|
||||||
<p>Use this call to list all the webhooks, as documented here at:
|
<p>Use this call to list all the webhooks, as documented here at:
|
||||||
<a href="https://developer.paypal.com/docs/api/#list-all-webhooks">https://developer.paypal.com/docs/api/#list-all-webhooks</a>
|
<a href="https://developer.paypal.com/docs/api/webhooks/v1/#webhooks_list">https://developer.paypal.com/docs/api/webhooks/v1/#webhooks_list</a>
|
||||||
API used: GET /v1/notifications/webhooks</p></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h2 id="list-webhooks">List Webhooks</h2></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><p>This step is not necessarily required. We are creating a webhook for sample purpose only, so that we would not
|
API used: GET /v1/notifications/webhooks</p></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h2 id="list-webhooks">List Webhooks</h2></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><p>This step is not necessarily required. We are creating a webhook for sample purpose only, so that we would not
|
||||||
get an empty list at any point.
|
get an empty list at any point.
|
||||||
In real case, you dont need to create any webhook to make this API call.</p></div></div><div class="code"><div class="wrapper"><span class="hljs-comment">/** <span class="hljs-doctag">@var</span> \PayPal\Api\Webhook $webhook */</span>
|
In real case, you dont need to create any webhook to make this API call.</p></div></div><div class="code"><div class="wrapper"><span class="hljs-comment">/** <span class="hljs-doctag">@var</span> \PayPal\Api\Webhook $webhook */</span>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<!DOCTYPE html><html lang="en"><head><title>notifications/SearchWebhookEvents</title></head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"><meta name="groc-relative-root" content="../"><meta name="groc-document-path" content="notifications/SearchWebhookEvents"><meta name="groc-project-path" content="notifications/SearchWebhookEvents.php"><link rel="stylesheet" type="text/css" media="all" href="../assets/style.css"><script type="text/javascript" src="../assets/behavior.js"></script><body><div id="meta"><div class="file-path">notifications/SearchWebhookEvents.php</div></div><div id="document"><div class="segment"><div class="code"><div class="wrapper"><span class="hljs-preprocessor"><?php</span></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h1 id="search-webhook-events-sample">Search Webhook Events Sample</h1>
|
<!DOCTYPE html><html lang="en"><head><title>notifications/SearchWebhookEvents</title></head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"><meta name="groc-relative-root" content="../"><meta name="groc-document-path" content="notifications/SearchWebhookEvents"><meta name="groc-project-path" content="notifications/SearchWebhookEvents.php"><link rel="stylesheet" type="text/css" media="all" href="../assets/style.css"><script type="text/javascript" src="../assets/behavior.js"></script><body><div id="meta"><div class="file-path">notifications/SearchWebhookEvents.php</div></div><div id="document"><div class="segment"><div class="code"><div class="wrapper"><span class="hljs-preprocessor"><?php</span></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h1 id="search-webhook-events-sample">Search Webhook Events Sample</h1>
|
||||||
<p>This sample code demonstrate how to use this call to search for all webhook events., as documented here at:
|
<p>This sample code demonstrate how to use this call to search for all webhook events., as documented here at:
|
||||||
<a href="https://developer.paypal.com/docs/api/#search-webhook-events">https://developer.paypal.com/docs/api/#search-webhook-events</a>
|
<a href="https://developer.paypal.com/docs/api/webhooks/v1/#webhooks-events_list">https://developer.paypal.com/docs/api/webhooks/v1/#webhooks-events_list</a>
|
||||||
API used: GET /v1/notifications/webhooks-events</p></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h2 id="get-webhook-instance">Get Webhook Instance</h2>
|
API used: GET /v1/notifications/webhooks-events</p></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h2 id="get-webhook-instance">Get Webhook Instance</h2>
|
||||||
<h2 id="please-note">PLEASE NOTE:</h2>
|
<h2 id="please-note">PLEASE NOTE:</h2>
|
||||||
<p>Creating webhook is sample purposes only. In real scenario, you dont need to create a new webhook everytime you want to search
|
<p>Creating webhook is sample purposes only. In real scenario, you dont need to create a new webhook everytime you want to search
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<!DOCTYPE html><html lang="en"><head><title>notifications/UpdateWebhook</title></head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"><meta name="groc-relative-root" content="../"><meta name="groc-document-path" content="notifications/UpdateWebhook"><meta name="groc-project-path" content="notifications/UpdateWebhook.php"><link rel="stylesheet" type="text/css" media="all" href="../assets/style.css"><script type="text/javascript" src="../assets/behavior.js"></script><body><div id="meta"><div class="file-path">notifications/UpdateWebhook.php</div></div><div id="document"><div class="segment"><div class="code"><div class="wrapper"><span class="hljs-preprocessor"><?php</span></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h1 id="update-webhook-sample">Update Webhook Sample</h1>
|
<!DOCTYPE html><html lang="en"><head><title>notifications/UpdateWebhook</title></head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"><meta name="groc-relative-root" content="../"><meta name="groc-document-path" content="notifications/UpdateWebhook"><meta name="groc-project-path" content="notifications/UpdateWebhook.php"><link rel="stylesheet" type="text/css" media="all" href="../assets/style.css"><script type="text/javascript" src="../assets/behavior.js"></script><body><div id="meta"><div class="file-path">notifications/UpdateWebhook.php</div></div><div id="document"><div class="segment"><div class="code"><div class="wrapper"><span class="hljs-preprocessor"><?php</span></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h1 id="update-webhook-sample">Update Webhook Sample</h1>
|
||||||
<p>This sample code demonstrate how to use this call to update a webhook; supports the replace operation only, as documented here at:
|
<p>This sample code demonstrate how to use this call to update a webhook; supports the replace operation only, as documented here at:
|
||||||
<a href="https://developer.paypal.com/docs/api/#update-a-webhook">https://developer.paypal.com/docs/api/#update-a-webhook</a>
|
<a href="https://developer.paypal.com/docs/api/webhooks/v1/#webhooks_update">https://developer.paypal.com/docs/api/webhooks/v1/#webhooks_update</a>
|
||||||
API used: PATCH v1/notifications/webhooks/<Webhook-Id></p></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h2 id="get-webhook-id">Get Webhook ID.</h2>
|
API used: PATCH v1/notifications/webhooks/<Webhook-Id></p></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h2 id="get-webhook-id">Get Webhook ID.</h2>
|
||||||
<p>In samples we are using CreateWebhook.php sample to get the created instance of webhook.
|
<p>In samples we are using CreateWebhook.php sample to get the created instance of webhook.
|
||||||
However, in real case scenario, we could use just the ID from database or use an already existing webhook.</p></div></div><div class="code"><div class="wrapper"><span class="hljs-comment">/** <span class="hljs-doctag">@var</span> \PayPal\Api\Webhook $webhook */</span>
|
However, in real case scenario, we could use just the ID from database or use an already existing webhook.</p></div></div><div class="code"><div class="wrapper"><span class="hljs-comment">/** <span class="hljs-doctag">@var</span> \PayPal\Api\Webhook $webhook */</span>
|
||||||
|
|||||||
@@ -39,8 +39,8 @@ To resolve that, we need to use alternative, which makes a call to PayPal's
|
|||||||
<span class="hljs-comment">//$headers = getallheaders();</span>
|
<span class="hljs-comment">//$headers = getallheaders();</span>
|
||||||
|
|
||||||
<span class="hljs-comment">/**
|
<span class="hljs-comment">/**
|
||||||
* In Documentions https://developer.paypal.com/docs/api/webhooks/#verify-webhook-signature_post
|
* In documentations https://developer.paypal.com/docs/api/webhooks/v1/#verify-webhook-signature
|
||||||
* All header keys as UPPERCASE, but I recive the header key as the example array, First letter as UPPERCASE
|
* All header keys as UPPERCASE, but I receive the header key as the example array, First letter as UPPERCASE
|
||||||
*/</span>
|
*/</span>
|
||||||
<span class="hljs-variable">$headers</span> = array_change_key_case(<span class="hljs-variable">$headers</span>, CASE_UPPER);
|
<span class="hljs-variable">$headers</span> = array_change_key_case(<span class="hljs-variable">$headers</span>, CASE_UPPER);
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<!DOCTYPE html><html lang="en"><head><title>notifications/WebhookEventTypesList</title></head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"><meta name="groc-relative-root" content="../"><meta name="groc-document-path" content="notifications/WebhookEventTypesList"><meta name="groc-project-path" content="notifications/WebhookEventTypesList.php"><link rel="stylesheet" type="text/css" media="all" href="../assets/style.css"><script type="text/javascript" src="../assets/behavior.js"></script><body><div id="meta"><div class="file-path">notifications/WebhookEventTypesList.php</div></div><div id="document"><div class="segment"><div class="code"><div class="wrapper"><span class="hljs-preprocessor"><?php</span></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h1 id="get-reference-list-of-all-webhook-event-types">Get Reference List of all Webhook Event Types</h1>
|
<!DOCTYPE html><html lang="en"><head><title>notifications/WebhookEventTypesList</title></head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"><meta name="groc-relative-root" content="../"><meta name="groc-document-path" content="notifications/WebhookEventTypesList"><meta name="groc-project-path" content="notifications/WebhookEventTypesList.php"><link rel="stylesheet" type="text/css" media="all" href="../assets/style.css"><script type="text/javascript" src="../assets/behavior.js"></script><body><div id="meta"><div class="file-path">notifications/WebhookEventTypesList.php</div></div><div id="document"><div class="segment"><div class="code"><div class="wrapper"><span class="hljs-preprocessor"><?php</span></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h1 id="get-reference-list-of-all-webhook-event-types">Get Reference List of all Webhook Event Types</h1>
|
||||||
<p>This sample code demonstrate how you can get reference list of all webhook event types, as documented here at:
|
<p>This sample code demonstrate how you can get reference list of all webhook event types, as documented here at:
|
||||||
<a href="https://developer.paypal.com/docs/api/#get-a-reference-list-of-webhook-event-types">https://developer.paypal.com/docs/api/#get-a-reference-list-of-webhook-event-types</a>
|
<a href="https://developer.paypal.com/docs/api/webhooks/v1/#webhooks-event-types_list">https://developer.paypal.com/docs/api/webhooks/v1/#webhooks-event-types_list</a>
|
||||||
API used: GET /v1/notifications/webhooks-event-types</p></div></div><div class="code"><div class="wrapper"><span class="hljs-variable">$apiContext</span> = <span class="hljs-keyword">require</span> <span class="hljs-keyword">__DIR__</span> . <span class="hljs-string">'/../bootstrap.php'</span>;</div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h3 id="get-list-of-all-webhook-event-types">Get List of all Webhook event types</h3></div></div></div><div class="segment"><div class="code"><div class="wrapper"><span class="hljs-keyword">try</span> {
|
API used: GET /v1/notifications/webhooks-event-types</p></div></div><div class="code"><div class="wrapper"><span class="hljs-variable">$apiContext</span> = <span class="hljs-keyword">require</span> <span class="hljs-keyword">__DIR__</span> . <span class="hljs-string">'/../bootstrap.php'</span>;</div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h3 id="get-list-of-all-webhook-event-types">Get List of all Webhook event types</h3></div></div></div><div class="segment"><div class="code"><div class="wrapper"><span class="hljs-keyword">try</span> {
|
||||||
<span class="hljs-variable">$output</span> = \PayPal\Api\WebhookEventType::availableEventTypes(<span class="hljs-variable">$apiContext</span>);
|
<span class="hljs-variable">$output</span> = \PayPal\Api\WebhookEventType::availableEventTypes(<span class="hljs-variable">$apiContext</span>);
|
||||||
} <span class="hljs-keyword">catch</span> (<span class="hljs-keyword">Exception</span> <span class="hljs-variable">$ex</span>) {</div></div></div><div class="segment"><div class="comments "><div class="wrapper"><p>NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY</p></div></div><div class="code"><div class="wrapper"> ResultPrinter::printError(<span class="hljs-string">"Get List of All Webhook Event Types"</span>, <span class="hljs-string">"WebhookEventTypeList"</span>, <span class="hljs-keyword">null</span>, <span class="hljs-keyword">null</span>, <span class="hljs-variable">$ex</span>);
|
} <span class="hljs-keyword">catch</span> (<span class="hljs-keyword">Exception</span> <span class="hljs-variable">$ex</span>) {</div></div></div><div class="segment"><div class="comments "><div class="wrapper"><p>NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY</p></div></div><div class="code"><div class="wrapper"> ResultPrinter::printError(<span class="hljs-string">"Get List of All Webhook Event Types"</span>, <span class="hljs-string">"WebhookEventTypeList"</span>, <span class="hljs-keyword">null</span>, <span class="hljs-keyword">null</span>, <span class="hljs-variable">$ex</span>);
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
// # Create Webhook Sample
|
// # Create Webhook Sample
|
||||||
//
|
//
|
||||||
// This sample code demonstrate how you can create a webhook, as documented here at:
|
// This sample code demonstrate how you can create a webhook, as documented here at:
|
||||||
// https://developer.paypal.com/docs/api/#create-a-webhook
|
// https://developer.paypal.com/docs/api/webhooks/v1/#webhooks_post
|
||||||
// API used: POST /v1/notifications/webhooks
|
// API used: POST /v1/notifications/webhooks
|
||||||
|
|
||||||
require __DIR__ . '/../bootstrap.php';
|
require __DIR__ . '/../bootstrap.php';
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
// # Delete Webhook Sample
|
// # Delete Webhook Sample
|
||||||
//
|
//
|
||||||
// This sample code demonstrate how to use this call to search for all webhook events., as documented here at:
|
// This sample code demonstrate how to use this call to search for all webhook events., as documented here at:
|
||||||
// https://developer.paypal.com/docs/api/#delete-a-webhook
|
// https://developer.paypal.com/docs/api/webhooks/v1/#webhooks_delete
|
||||||
// API used: DELETE v1/notifications/webhooks/<Webhook-Id>
|
// API used: DELETE v1/notifications/webhooks/{webhook_id}
|
||||||
|
|
||||||
// ## Get Webhook Instance
|
// ## Get Webhook Instance
|
||||||
|
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
// # Get Webhook Sample
|
// # Get Webhook Sample
|
||||||
//
|
//
|
||||||
// This sample code demonstrate how you can get a webhook, as documented here at:
|
// This sample code demonstrate how you can get a webhook, as documented here at:
|
||||||
// https://developer.paypal.com/docs/api/#get-a-webhook
|
// https://developer.paypal.com/docs/api/webhooks/v1/#webhooks_get
|
||||||
// API used: GET /v1/notifications/webhooks/<Webhook-Id>
|
// API used: GET /v1/notifications/webhooks/{webhook_id}
|
||||||
|
|
||||||
// ## Get Webhook ID.
|
// ## Get Webhook ID.
|
||||||
// In samples we are using CreateWebhook.php sample to get the created instance of webhook.
|
// In samples we are using CreateWebhook.php sample to get the created instance of webhook.
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
// # Get Webhook Sample
|
// # Get Webhook Sample
|
||||||
//
|
//
|
||||||
// This sample code demonstrate how you can get a webhook, as documented here at:
|
// This sample code demonstrate how you can get a webhook, as documented here at:
|
||||||
// https://developer.paypal.com/docs/api/#get-a-webhook
|
// https://developer.paypal.com/docs/api/webhooks/v1/#webhooks_get
|
||||||
// API used: GET /v1/notifications/webhooks/<Webhook-Id>
|
// API used: GET /v1/notifications/webhooks/{webhook_id}
|
||||||
|
|
||||||
// ## List Subscribed Event Types
|
// ## List Subscribed Event Types
|
||||||
// Use this call to retrieve the list of events types that are subscribed to a webhook.
|
// Use this call to retrieve the list of events types that are subscribed to a webhook.
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
// # Get All Webhooks Sample
|
// # Get All Webhooks Sample
|
||||||
//
|
//
|
||||||
// Use this call to list all the webhooks, as documented here at:
|
// Use this call to list all the webhooks, as documented here at:
|
||||||
// https://developer.paypal.com/docs/api/#list-all-webhooks
|
// https://developer.paypal.com/docs/api/webhooks/v1/#webhooks_list
|
||||||
// API used: GET /v1/notifications/webhooks
|
// API used: GET /v1/notifications/webhooks
|
||||||
|
|
||||||
// ## List Webhooks
|
// ## List Webhooks
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
// # Search Webhook Events Sample
|
// # Search Webhook Events Sample
|
||||||
//
|
//
|
||||||
// This sample code demonstrate how to use this call to search for all webhook events., as documented here at:
|
// This sample code demonstrate how to use this call to search for all webhook events., as documented here at:
|
||||||
// https://developer.paypal.com/docs/api/#search-webhook-events
|
// https://developer.paypal.com/docs/api/webhooks/v1/#webhooks-events_list
|
||||||
// API used: GET /v1/notifications/webhooks-events
|
// API used: GET /v1/notifications/webhooks-events
|
||||||
|
|
||||||
// ## Get Webhook Instance
|
// ## Get Webhook Instance
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
// # Update Webhook Sample
|
// # Update Webhook Sample
|
||||||
//
|
//
|
||||||
// This sample code demonstrate how to use this call to update a webhook; supports the replace operation only, as documented here at:
|
// This sample code demonstrate how to use this call to update a webhook; supports the replace operation only, as documented here at:
|
||||||
// https://developer.paypal.com/docs/api/#update-a-webhook
|
// https://developer.paypal.com/docs/api/webhooks/v1/#webhooks_update
|
||||||
// API used: PATCH v1/notifications/webhooks/<Webhook-Id>
|
// API used: PATCH v1/notifications/webhooks/{webhook_id}
|
||||||
|
|
||||||
// ## Get Webhook ID.
|
// ## Get Webhook ID.
|
||||||
// In samples we are using CreateWebhook.php sample to get the created instance of webhook.
|
// In samples we are using CreateWebhook.php sample to get the created instance of webhook.
|
||||||
|
|||||||
@@ -44,8 +44,8 @@ $requestBody = '{"id":"WH-7MU294299R542214K-4N1831857K851783H","event_version":"
|
|||||||
//$headers = getallheaders();
|
//$headers = getallheaders();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* In Documentions https://developer.paypal.com/docs/api/webhooks/#verify-webhook-signature_post
|
* In documentations https://developer.paypal.com/docs/api/webhooks/v1/#verify-webhook-signature
|
||||||
* All header keys as UPPERCASE, but I recive the header key as the example array, First letter as UPPERCASE
|
* All header keys as UPPERCASE, but I receive the header key as the example array, First letter as UPPERCASE
|
||||||
*/
|
*/
|
||||||
$headers = array_change_key_case($headers, CASE_UPPER);
|
$headers = array_change_key_case($headers, CASE_UPPER);
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
// # Get Reference List of all Webhook Event Types
|
// # Get Reference List of all Webhook Event Types
|
||||||
//
|
//
|
||||||
// This sample code demonstrate how you can get reference list of all webhook event types, as documented here at:
|
// This sample code demonstrate how you can get reference list of all webhook event types, as documented here at:
|
||||||
// https://developer.paypal.com/docs/api/#get-a-reference-list-of-webhook-event-types
|
// https://developer.paypal.com/docs/api/webhooks/v1/#webhooks-event-types_list
|
||||||
// API used: GET /v1/notifications/webhooks-event-types
|
// API used: GET /v1/notifications/webhooks-event-types
|
||||||
|
|
||||||
$apiContext = require __DIR__ . '/../bootstrap.php';
|
$apiContext = require __DIR__ . '/../bootstrap.php';
|
||||||
|
|||||||
Reference in New Issue
Block a user