title: Paypal returning back to my site when payment is done
body: <p>I am using this code to pass my values to <strong>paypal</strong>.
  Now my problem is that, that after the payment is complete I should be on my page so that I can manipulate some of the things like I should save the <strong>Token</strong> for future reference and so. Again I comes back to my page when <strong>user implicitly clicks</strong> the link formed in the page of <strong>paypal</strong> after the <strong>payment is done</strong>.But here the problem is I cant just rely on user to click or do so.I want that it should be implicit without any user intervention.
  Thanks in advance,please shed some light.....</p>
  
  <pre><code>&lt;% 
  
      String apiusername="USERNAME";
      String apipassword="PASSWORD";
  
      String truePath="http://localhost:8080/Befundo/xtraFiles/paypal/paypalResponse.jsp";
      String falsePath="http://localhost:8080/PaypalGS/paypalResponseCancel.jsp";
  
      String itemName="Computer Laptop";
      String quantity="2";
      String amount="100";
  %&gt;
  
  
  &lt;body &gt;
  &lt;form name="paypalForm" action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post"&gt;
       &lt;input type="text" name="cmd" value="_xclick" /&gt;
       &lt;input type="text" name="business" value="&lt;%=apiusername %&gt;" /&gt;
       &lt;input type="text" name="password" value="&lt;%=apipassword %&gt;" /&gt;
       &lt;input type="text" name="custom" value="1123" /&gt;
       &lt;input type="text" name="item_name" value="&lt;%=itemName%&gt;" /&gt;
       &lt;input type="text" name="amount" value="&lt;%=amount%&gt;"/&gt;
       &lt;input type="hidden" name="quantity" value="&lt;%=quantity %&gt;" /&gt;
       &lt;input type="text" name="rm" value="1" /&gt;
       &lt;input type="text" name="return" value="&lt;%=truePath %&gt;" /&gt;
       &lt;input type="text" name="cancel_return" value="&lt;%=falsePath %&gt;" /&gt;
       &lt;input type="text" name="cert_id" value="API Singature" /&gt;
       &lt;input type='submit' value='Pay'&gt;
  &lt;/form&gt;
  &lt;/body&gt;
  </code></pre>