Fixes to Agreement Search Transaction

- Added searchTransactions method to include params
- Updated Tests accordingly.
- Updated Samples accordingly
This commit is contained in:
japatel
2015-01-20 10:46:22 -06:00
parent baf06a66be
commit 4326394447
8 changed files with 147 additions and 238 deletions

View File

@@ -4,23 +4,23 @@
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.
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-phpdoc"> @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"><p>Updating the webhook as per given request
[
{
&quot;op&quot;:&quot;replace&quot;,
&quot;path&quot;:&quot;/url&quot;,
&quot;value&quot;:&quot;<a href="https://requestb.in/10ujt3c1">https://requestb.in/10ujt3c1</a>&quot;
},
{
&quot;op&quot;:&quot;replace&quot;,
&quot;path&quot;:&quot;/event_types&quot;,
&quot;value&quot;:[
{
&quot;name&quot;:&quot;PAYMENT.SALE.REFUNDED&quot;
}
]
}
]</p></div></div><div class="code"><div class="wrapper"><span class="hljs-variable">$patch</span> = <span class="hljs-keyword">new</span> \PayPal\Api\Patch();
<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"><p>Updating the webhook as per given request</p>
<pre><code> [
{
&quot;op&quot;:&quot;replace&quot;,
&quot;path&quot;:&quot;/url&quot;,
&quot;value&quot;:&quot;https://requestb.in/10ujt3c1&quot;
},
{
&quot;op&quot;:&quot;replace&quot;,
&quot;path&quot;:&quot;/event_types&quot;,
&quot;value&quot;:[
{
&quot;name&quot;:&quot;PAYMENT.SALE.REFUNDED&quot;
}
]
}
]</code></pre></div></div><div class="code"><div class="wrapper"><span class="hljs-variable">$patch</span> = <span class="hljs-keyword">new</span> \PayPal\Api\Patch();
<span class="hljs-variable">$patch</span>-&gt;setOp(<span class="hljs-string">"replace"</span>)
-&gt;setPath(<span class="hljs-string">"/url"</span>)
-&gt;setValue(<span class="hljs-string">"https://requestb.in/10ujt3c1?uniqid="</span>. uniqid());