Asked 4 years ago
2 Jan 2020
Views 1471
noob

noob posted

Paypal return url not getting query string

i am integrating Paypal and i am not getting any query string at success url
i set return url like this return_url' => 'http://mydomain.com/success.php',
	
if(!empty($_GET['item_number']) && !empty($_GET['tx']) && !empty($_GET['amt']) && !empty($_GET['cc']) && !empty($_GET['st'])){ 
		// Get transaction information from URL 
		$item_number = $_GET['item_number'];  
		$txn_id = $_GET['tx']; 
		$payment_gross = $_GET['amt']; 
		$currency_code = $_GET['cc']; 
		$payment_status = $_GET['st']; 
		 
		 
	} 




  <form class="paypal" action="paypal.php" method="post" id="paypal_form">
        <input type="hidden" name="cmd" value="_xclick" />
        <input type="hidden" name="no_note" value="1" />
        <input type="hidden" name="lc" value="UK" />
        <input type="hidden" name="bn" value="PP-BuyNowBF:btn_buynow_LG.gif:NonHostedGuest" />
        <input type="hidden" name="first_name" value="Customer's First Name" />
        <input type="hidden" name="last_name" value="Customer's Last Name" />
        <input type="hidden" name="payer_email" value="customer@example.com" />
        <input type="hidden" name="item_number" value="123456" />
 
Rasi

Rasi
answered Nov 30 '-1 00:00

add hidden input with name of rm and set value to 1
like this

   <input type="hidden" name="rm" value="1" />

so final form will be like this

 <form class="paypal" action="paypal.php" method="post" id="paypal_form">
        <input type="hidden" name="cmd" value="_xclick" />
        <input type="hidden" name="no_note" value="1" />
        <input type="hidden" name="lc" value="UK" />
        <input type="hidden" name="bn" value="PP-BuyNowBF:btn_buynow_LG.gif:NonHostedGuest" />
        <input type="hidden" name="first_name" value="Customer's First Name" />
        <input type="hidden" name="last_name" value="Customer's Last Name" />
        <input type="hidden" name="payer_email" value="customer@example.com" />
        <input type="hidden" name="item_number" value="123456" />
        <input type="hidden" name="rm" value="1" />
</form>


rm means return method
rm =1 , return GET query string
rm=2 , return POST query string
Post Answer