I have my code as follows:
$paypal_url = 'https://www.sandbox.paypal.com/cgi-bin/webscr';
$paypal_id = 'payments@business.com';
$str .= "<form method='post' action='".$paypal_url."'>";
$str .= "<input type='hidden' name='business' value='".$paypal_id."'>";
$str .= "<input type='hidden' name='cmd' value='_xclick'>";
$str .= "<input type='hidden' name='item_name' value='Room'>";
$str .= "<input type='hidden' name='item_number' value='".getRoom($id)."'>";
$str .= "<input type='hidden' name='currency_code' value='USD'>";
$str .= "<input type='hidden' name='no_shipping' value='1'>";
$str .= "<input type='hidden' name='amount' id='paypal_cost' value='".getBal($id)."'>";
$str .= "<input name='notify_url' value='http://localhost/tropicana/guests/notify.php' type='hidden'>";
$str .= "<input type='hidden' name='cancel_return' value='http://localhost/tropicana/guests/payments.php'>";
$str .= "<input type='hidden' name='return' value='http://localhost/tropicana/guests/notify.php'>";
$str .= "<button type='submit' name='submit' class='form-control btn-danger'>Pay $".getBal($id)." with <i>PayPal</i>";
$str .= "</form>";
But after a successful payment, my return script notify.php
is not receiving any variables.
When i try to print_r()
the $_REQUEST
, it returns an empty array.