Final Webhook Management API Changes

- Updated Samples
- Additional Functional Tests
- Enabled Travis to do functional tests (with allowed failures) on each build
This commit is contained in:
japatel
2014-12-15 13:52:00 -06:00
parent fb9584ba66
commit d24a4afdb6
21 changed files with 439 additions and 38 deletions

View File

@@ -14,7 +14,11 @@ API used: POST /v1/notifications/webhooks</p></div></div><div class="code"><div
]
}</code></pre>
<p>Fill up the basic information that is required for the webhook
The URL should be actually accessible over the internet. Having a localhost here would not work.</p></div></div><div class="code"><div class="wrapper"><span class="hljs-variable">$webhook</span>-&gt;setUrl(<span class="hljs-string">"https://requestb.in/10ujt3c1?uniqid="</span> . uniqid());</div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h1 id="event-types">Event Types</h1>
The URL should be actually accessible over the internet. Having a localhost here would not work.</p>
<h4 id="there-is-an-open-source-tool-http-requestb-in-that-allows-you-to-receive-any-web-requests-to-a-url-given-there-">There is an open source tool <a href="http://requestb.in/">http://requestb.in/</a> that allows you to receive any web requests to a url given there.</h4>
<h4 id="note-please-note-that-you-need-an-https-url-for-paypal-webhooks-you-can-however-override-the-url-with-https-and-accept">NOTE: Please note that you need an https url for paypal webhooks. You can however override the url with https, and accept</h4>
<p>any warnings your browser might show you. Also, please note that this is entirely for demo purposes, and you should not
be using this in production</p></div></div><div class="code"><div class="wrapper"><span class="hljs-variable">$webhook</span>-&gt;setUrl(<span class="hljs-string">"https://requestb.in/10ujt3c1?uniqid="</span> . uniqid());</div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h1 id="event-types">Event Types</h1>
<p>Event types correspond to what kind of notifications you want to receive on the given URL.</p></div></div><div class="code"><div class="wrapper"><span class="hljs-variable">$webhookEventTypes</span> = <span class="hljs-keyword">array</span>();
<span class="hljs-variable">$webhookEventTypes</span>[] = <span class="hljs-keyword">new</span> \PayPal\Api\WebhookEventType(
<span class="hljs-string">'{