forked from LiveCarta/PayPal-PHP-SDK
Fixes to Agreement Search Transaction
- Added searchTransactions method to include params - Updated Tests accordingly. - Updated Samples accordingly
This commit is contained in:
@@ -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
|
||||
[
|
||||
{
|
||||
"op":"replace",
|
||||
"path":"/url",
|
||||
"value":"<a href="https://requestb.in/10ujt3c1">https://requestb.in/10ujt3c1</a>"
|
||||
},
|
||||
{
|
||||
"op":"replace",
|
||||
"path":"/event_types",
|
||||
"value":[
|
||||
{
|
||||
"name":"PAYMENT.SALE.REFUNDED"
|
||||
}
|
||||
]
|
||||
}
|
||||
]</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> [
|
||||
{
|
||||
"op":"replace",
|
||||
"path":"/url",
|
||||
"value":"https://requestb.in/10ujt3c1"
|
||||
},
|
||||
{
|
||||
"op":"replace",
|
||||
"path":"/event_types",
|
||||
"value":[
|
||||
{
|
||||
"name":"PAYMENT.SALE.REFUNDED"
|
||||
}
|
||||
]
|
||||
}
|
||||
]</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>->setOp(<span class="hljs-string">"replace"</span>)
|
||||
->setPath(<span class="hljs-string">"/url"</span>)
|
||||
->setValue(<span class="hljs-string">"https://requestb.in/10ujt3c1?uniqid="</span>. uniqid());
|
||||
|
||||
Reference in New Issue
Block a user