Is it possible to call a function once the payment is done through Paypal form?
<p>I want to run a function in the background once the payment is done through paypal.</p>

<p>Here is my form:</p>

<pre><code>&lt;form name="_xclick" action="https://www.paypal.com/cgi-bin/webscr" method="post"&gt;
                    &lt;input type="hidden" name="cmd" value="_xclick"&gt;
                    &lt;input type="hidden" name="business" value="email"&gt;
                    &lt;input type="hidden" name="currency_code" value="USD"&gt;
                    &lt;input type="hidden" name="item_name" value="{{item.title}}"&gt;
                    &lt;input type="hidden" name="amount" value="{{item.price}}"&gt;
                    &lt;input type="image" src="http://www.paypalobjects.com/en_US/i/btn/btn_buynow_LG.gif"         border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!"&gt;
                &lt;/form&gt;
</code></pre>

<p>I followed <a href="https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/buynow_buttons/" rel="nofollow">Paypal tutorial</a> but they didn't show how to run a function IF the payment is done successfully.</p>

<p>is it possible to do so?</p>