title: Integrating paypal sandbox in php
body: <p>I am trying to integrate paypal sandbox in php.</p>
  
  <p>I have code below</p>
  
  <pre><code>&lt;?php
  $paypalURL = 'https://www.sandbox.paypal.com/cgi-bin/webscr'; 
  $paypalID = 'dnyaneshk8.business@gmail.com'; //Business Email
  
  ?&gt;
  &lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
    &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
     &lt;title&gt;PayPal Standard Payment Gateway Integration by CodexWorld&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;br/&gt;Name: Movie Kabaali
  &lt;br/&gt;Price: 101
  &lt;form action="&lt;?php echo $paypalURL; ?&gt;" method="post"&gt;
  
      &lt;input type="hidden" name="business" value="&lt;?php echo $paypalID;             ?&gt;"&gt;
  
      &lt;!-- Specify a Buy Now button. --&gt;
      &lt;input type="hidden" name="cmd" value="_xclick"&gt;
       &lt;input type="hidden" name="item_name" value="Kabali movie ticket"&gt;
      &lt;input type="hidden" name="item_number" value="2"&gt;
      &lt;input type="hidden" name="amount" value="101"&gt;
      &lt;input type="hidden" name="currency_code" value="USD"&gt;
      &lt;input type="hidden" name="quantity" value="2"&gt;
  
      &lt;!-- Specify URLs --&gt;
      &lt;input type='hidden' name='cancel_return' value='http://localhost/paypal_jatin/cancel.php'&gt;
      &lt;input type='hidden' name='return' value='http://localhost/paypal_jatin/success.php'&gt;
  
      &lt;!-- Display the payment button. --&gt;
      &lt;input type="image" name="submit" border="0"
      src="https://www.paypalobjects.com/en_US/i/btn/btn_buynow_LG.gif" alt="PayPal - The safer, easier way to pay online"&gt;
      &lt;img alt="" border="0" width="1" height="1" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" &gt;
  &lt;/form&gt;
  
   &lt;/body&gt;
   &lt;/html&gt;
  </code></pre>
  
  <p>This code working but when payment is successful, it not returning to my site immediately. </p>
  
  <p>It is giving message like</p>
  
  <pre><code> you've just completed your payment.
  </code></pre>
  
  <p>And then after that below two links are there</p>
  
  <p>1 . Return to Dyanesh Business's Test Store</p>
  
  <p>2 . Go to PayPal account overview</p>
  
  <p>I want that when transaction successful user should redirected to the localhost.</p>
  
  <p>Please help me to solve this issue.</p>