PHP Developer

Thursday, 20 July 2017

How to get transaction details in notify_url page in paypal

How to get transaction details in notify_url page in paypal


<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="POST" name="_xclick" id="paypal_form">
   <input type="hidden" name="upload" value="1" />
   <input type="hidden" name="cmd" value="_xclick" />
   <!-- The business email address, where you want to receive the payment -->
   <!--<input type="hidden" name="business" value="yesidealpayment@gmail.com" />-->
   <input type="hidden" name="business" value="sunil@rudrainnovatives.com" />
   <!-- The customer email address -->
   <input type="hidden" name="item_name_1" value="Invoice payment" />
   <input type="hidden" name="amount_1" value="2" />
   <!--<input type="hidden" name="currency_code" value="AUD" />-->
   <input type="hidden" name="currency_code" value="USD" />
   <input type="hidden" name="amount" value="2" /> 
   <!-- Where you want to return after PayPal Payment -->
   <input type="hidden" name="return" value="http://localhost/paypals/response.php" />
   <!-- A back-end notification send to the specific page after successful payment  -->
   <!--<input type="hidden" name="notify_url" value="http://yes-i-deal.com.au/test/paypal.php" />-->
   <input type="hidden" name="notify_url" value="http://localhost/paypals/response.php" />
   <!-- Where you want to return after cancel the PayPal Payment  -->
   <input type="hidden" name="cancel_return" value="http://localhost/paypals/response.php" />
   <input type="hidden" name="custom" value="25" />  
   <input type="image" name="submit"   src="http://localhost/paypals/themes/green/images/Buy-Now-Button.png" />
</form>



In my notify_url page I am getting values as : 

<?php
echo "<pre>";
print_r($_REQUEST);
echo "<pre>";
?>